Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8074437
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T14:38:53+00:00 2026-06-05T14:38:53+00:00

i am adding data and upload files in php using ajax but it return

  • 0

i am adding data and upload files in php using ajax
but it return require appname i will write query in GetPhp.php appname is required

if(!appid)
    {
    var appname=document.getElementById("appname").value;
    parameters ="appname="+appname;
    /*var apptype=document.getElementById("apptype").value;
    parameters ="apptype="+apptype;
    var appurl=document.getElementById("appurl").value;
    parameters ="appurl="+appurl;
    var appguid=document.getElementById("appguid").value;
    parameters ="appguid="+appguid;
    var cname=document.getElementById("cname").value;
    parameters ="cname="+cname;*/
    $.ajaxFileUpload
            (
            {

                    url:'uploadplist.php',
                    secureuri:false,
                    fileElementId:'plist',
                    dataType: 'json',
                    data:{name:'logan', id:'id'},
                    success: function (data, status)
                    {


                        var plist=data.msg;

                        parameters +="&plist="+plist;

                       $.ajaxFileUpload
                         (
                          {

                          url:'uploadipa.php',
                          secureuri:false,
                          fileElementId:'ipa',
                          dataType: 'json',
                          data:{name:'logan1', id:'id1'},
                          success: function (data, status)
                          {
                           var ipa=data.msg;
                           parameters +="&ipa="+ipa;
                              $.ajaxFileUpload
                             (
                              {

                            url:'uploadprovision.php',
                            secureuri:false,
                            fileElementId:'provision',
                            dataType: 'json',
                            data:{name:'logan2', id:'id2'},
                            success: function (data, status)
                            {
                            var provision=data.msg;
                            parameters +="&provision="+provision;
                            $("input#appname").val('');
                            /*$("input#apptype").val('');
                            $("input#appurl").val('');
                            $("input#appguid").val('');
                            $("input#cname").val('');*/
                            $('#mask').hide();
                            $('.window').hide();
                            httprequest.onreadystatechange=alertContents;
                            httprequest.open('POST','GetPhp.php',true);
                            httprequest.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
                            httprequest.setRequestHeader("Content-length", parameters.length);
                            httprequest.setRequestHeader("Connection", "close");
                            httprequest.send(parameters);
                            },
                           error: function (data, status, e)
                           {
                           alert(e);
                           }
                         }
                       )

                          },
                         error: function (data, status, e)
                         {
                         alert(e);
                         }
                         }
                       )


                    },
                    error: function (data, status, e)
                    {
                        alert(e);
                    }
            }
            )

            }

i insert only appname its working
when i am removing the comments for apptype ,appurl,appquid,cname its not uploaded
quid me

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T14:38:55+00:00Added an answer on June 5, 2026 at 2:38 pm

    I’m not entirely clear on what you’re asking but I think your problem is here:

    var appname=document.getElementById("appname").value;
    parameters ="appname="+appname;
    var apptype=document.getElementById("apptype").value;
    parameters ="apptype="+apptype;
    var appurl=document.getElementById("appurl").value;
    parameters ="appurl="+appurl;
    var appguid=document.getElementById("appguid").value;
    parameters ="appguid="+appguid;
    var cname=document.getElementById("cname").value;
    parameters ="cname="+cname;
    

    You’re replacing parameters not adding to it. Try…

    var appname=document.getElementById("appname").value;
    parameters ="appname="+appname;
    var apptype=document.getElementById("apptype").value;
    parameters +="&apptype="+apptype;
    ...
    

    (notice the += and the additional &)

    or more readably…

    var parameters =
        "appname="  + $("#appname").val() + 
        "&apptype=" + $("#apptype").val() +
        "&appurl="  + $("#appurl").val() +
        "&appguid=" + $("#appguid").val() + 
        "&cname="   + $("#cname").val();
    

    You may also need to urlencode the parameters (it’s good practice)

    eg …

    var parameters =
        "appname="  + encodeURIComponent($("#appname").val()) + 
        "&apptype=" + encodeURIComponent($("#apptype").val()) +
        "&appurl="  + encodeURIComponent($("#appurl").val())  +
        "&appguid=" + encodeURIComponent($("#appguid").val()) + 
        "&cname="   + encodeURIComponent($("#cname").val());
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am adding data to a dataset using the below code cmdExcel.CommandText = SELECT
I am adding data to my database, but would like to retrieve the UnitID
I've taught myself Obj-C, and have been self-teaching Cocoa, but adding Core Data to
I am using Codeigniter and I am trying to upload multiple files into a
I am uploading files using SWFUpload. To get the data I need passed along
I came across an issue today when adding an upload data modification to a
I am using cakephp 2.1 and i am trying to upload files and how
I keep adding data to a List as my app runs. When I close
I am getting the following exception while adding data into database: org.hibernate.HibernateException: The database
I have a MyISAM table with more than 10^7 rows. When adding data to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.