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 7075137
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T06:08:29+00:00 2026-05-28T06:08:29+00:00

I have sent data to my jquery file and I tested the data string

  • 0

I have sent data to my jquery file and I tested the data string and everything is stored where it should be but when I post it to my php file all the variables are null. Can someone help me?

$(document).ready(function() {
  $(".button").click(function() {
  //$('.error').hide();
  var firstname = $("input#First_Name").val(); 
  var lastname = $("input#Last").val(); 
  var areacode = $("input#area_code").val(); 
  var phonenumber = $("input#Phone_Number").val(); 
  var emailaddress = $("input#emailaddress").val(); 
  var confirmemail = $("input#confirm_email").val(); 
  var password = $("input#Password_Input").val(); 
  var confirmpassword = $("input#ConfirmPassword").val(); 
  var streetaddress = $("input#StreetAddress_input").val(); 
  var streetaddress2 = $("input#StreetAddress2_input").val();
  var city = $("input#City_Input").val(); 
  var state = $("input#StateInput").val(); 
  var zipcode = $("input#ZipCode").val(); 
  var month = $("input#month_input").val(); 
  var day = $("input#day_input").val(); 
  var year = $("input#year_input").val(); 
  var services = $("input#services_input").val(); 
  var agreement = $("input#agreement").val(); 

  var dataString = 'firstname=' + firstname + '&lastname=' + lastname + '&areacode=' + areacode + '&phonenumber=' + phonenumber + '&emailaddress=' + emailaddress + '&confirmemail=' + confirmemail + '&password=' + password + '&streetaddress=' + streetaddress + '&streetaddress2=' + streetaddress2 + '&city=' + city + '&state=' + state + '&zipcode=' + zipcode + '&month=' + month + '&day=' + day + '&year=' + year + '&services=' + services + '&agreement=' + agreement; 
  alert(dataString); 
  $.ajax({
        type: "POST",
        url: "http://www.vectorcreditsolution.com/js/process.php",
        data: dataString,
            success: function() {
            alert("Yay it was sent"); 
    }
        });
        return false;
     });

and then my php file

<?php
    $FirstName = $_POST["firstname"];  
    $LastName = $_POST['lastname']; 
    $AreaCode = $_POST['areacode']; 
    $PhoneNumber = $_POST['phonenumber']; 
    $EmailAddress = $_POST['emailaddress']; 
    $Password = $_POST['password']; 
    $StreetAddress = $_POST['streetaddress']; 
    $StreetAddress2 = $_POST['streetaddress2']; 
    $City= $_POST['city']; 
    $State = $_POST['state']; 
    $ZipCode = $_POST['zipcode']; 
    $Month = $_POST['month']; 
    $Day = $_POST['day']; 
    $Year= $_POST['year'];
    $Service=$_POST['services']; 

    var_dump($_POST["firstname"]); 
    var_dump($_POST['firstname']); 
    var_dump($_POST[firstname]); 
  • 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-05-28T06:08:30+00:00Added an answer on May 28, 2026 at 6:08 am

    You aren’t outputting the returned data from the AJAX and you aren’t using a tool to view it. Perhaps you are expecting the var dumps to appear on the page. They will not, they will be returned into the success function where you can use the data how you see fit.

    jQuery’s AJAX method will pipe the output from your PHP file into the ‘ret’ variable inside the success function. If you wish to return an HTML success message, for example, you can then add that HTML to the page without refreshing it. Or any of a million things.

    You should read up on AJAX.

    Change This:

    $.ajax({
    type: "POST",
        url: "http://www.vectorcreditsolution.com/js/process.php",
        data: dataString,
        success: function() {
            alert("Yay it was sent"); 
        }
    });
    

    To This:

    $.ajax({
    type: "POST",
        url: "http://www.vectorcreditsolution.com/js/process.php",
        data: dataString,
        success: function(ret) {
            alert(ret); 
        }
    });
    

    And then click your button on the page with the jQuery.

    Do not combine this with the other answers on this page. One is going to change your array keys on you (serialize).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm sending post data using jquery, but when I retrieve it in asp all
I have some jQuery that sends data to a AddComment.php page. The data is
I have POST data that contains the Japanese string AKB48 ネ申テレビ シーズン3 , defined
I'm trying to delete a file with jQuery's $.ajax and php. I have the
First time dealing with json. I have a php file that processes the post
I have a form that is capturing data sent from a google LocalSearch API.
I have an application where the contents of e-mails that get sent are stored
In a JS file I have this: $.ajaxSetup({ type: 'POST', contentType: application/json; charset=utf-8, dataType:
I have a .net web application that post data to server from javascript via
I have a form that uses jQuery to submit an ajax post and it

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.