Je suis nouveau à Jquery. J'essaie de poster un formulaire dans un fichier php en utilisant Jquery Post, j'ai fait un var_dump ($ _ POST) dans le fichier php mais je ne peux voir qu'un tableau vide (vu en utilisant firebug net), mais je reviens au succès fonction de Jquery. Peut-être que je fais quelque chose de stupide .. Tout le comportement Javascript fonctionne comme prévu, sauf ce problème. Quelqu'un s'il vous plaît aiderAjax POST ne fonctionne pas en utilisant Jquery et PHP
$(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;
});
});
Merci pour votre temps .. il m'a vraiment aidé – Codemator
votre bienvenue @Renjith – GBD