I'm building a form that uses ajax and php to validate an email address that a user has submitted. I'm about intermediate when it comes to php but with ajax i'm afraid I'm a novice.
I've done all the php and know it will work fine, problem is how do I make the ajax process the php script, currently I have created a function in ajax called completeSignup(); and it looks as:
function completeSignup() {
setTimeout(function() {
$("#completeform").fadeOut(400, function(){
$(this).before('<span class="done">All done! We will be in touch.</span>');
});
}, 1100);
}
How do include the php script inside the function and keep it all on the same page?
Thanks