I am trying to create a email invite form where the user inputs their friend's email address and an email is sent to that friend with further instructions on how to sign up for the website.
My question is this: how do I use AJAX to store the email address that the user submits to mySQL database?
Here is the snippet of code that the author of the email invite form demo said to use "ajax() call to pass the address into your database":
function completeInviteForm() {
setTimeout(function() {
$("#completeform").fadeOut(400, function(){
$(this).before('<span class="msg">All set! We will be in touch.</span>');
});
}, 1100);
}