I'm trying to process a form with php via the jquery post function. The first part, with serializing the data is working. I'm alerting out the data and everything looks good. But I'm not getting a response back from php. To debug this I have tried just simply echoing back a text message and that is not even working. What am I doing wrong?
Here is my query:
Code:
$(document).ready(function(){
$(".vote_btn").click(function() {
var formData = $('#form').serialize();
alert(formData); // this is alerting the correct info
$.post('scripts/proc_form2.php', formData, processResponse);
});
function processResponse(data){
alert(data); // the alert never triggers
}
}); // end doc.ready
Here is the simplified php file
PHP Code:
<?php
echo "made it to php and back!!!!";
?>
Bookmarks