I am new to Jquery. I am trying to post a form to a php file using Jquery Post, I did a var_dump($_POST) in the php file but i can see only an empty array ( saw using firebug net), but i am coming back to the success function of Jquery. May be I am doing some thing silly..All the Javascript behaviour is working as expected except this problem. Somebody please help
$(document).ready(function() {
//if submit button is clicked
$('#submit').click(function () {
//show the loading sign
$('#example').modal('show') ;
//start the ajax
$.ajax({
//this is the php file that processes the data
url: "mvc/process_form.php",
//GET method is used
type: "POST",
//Do not cache the page
cache: false,
//success
success: function (html) {
//if process_form.php returned 1/true (process success)
if (html==1) {
//hide the form
$('.form').fadeOut('slow');
//show the success message
$('.done').fadeIn('slow');
//if process.php returned 0/false (send mail failed)
} else alert('Sorry, unexpected error. Please try again later.');
}
});
//cancel the submit button default behaviours
return false;
});
});