Hey guys! This is my first time trying my hand at ajax and im just putting my foot in the water first. i'm trying to make it so when the form is submitted, the data is shown on the page. Here's the code:
the php code:Code:$('document').ready(function () { $('form #submit').click(function(e){ e.preventDefault(); var formdata = $('form').serialize(); $.ajax({ type: 'POST', url:'ajax_recieve.php', data: formdata, dataType: 'html', success: function(data){ data.appendTo('footer'); } }); }); });
can someone help me with this code please?PHP Code:<?php
if($_POST){
return "post sdssd";
}
?>



Reply With Quote



Bookmarks