Hello, Below I have my Small form:
Then I have my JS to process this...
How and what can I do to allow this form to insert into SQL Database?
I'd like to insert into SQL their emailaddress, IP, date and referral page....
Thanks for anyone that can help!
Code:
<p id="join_our_mailing_list">Join our mailing list</p> <form method="post" name="join" action="#" /> <input type="text" class="input_text" name="join_us_email" id="join_us_email" /> <input type="submit" value="submit" class="button join_us_button" /> </form>
Then I have my JS to process this...
Code:
$(".join_us_button").click(function() { var email = $("#join_us_email").val(); var dataString = 'join_us_email='+ email; if(email=='') { $('p#join_our_mailing_list').replaceWith("<p>Provide email</p>"); } else { $.ajax({ type: "POST", url: "join.php", data: dataString, success: function() { $('p#join_our_mailing_list').replaceWith("<p>Thank you</p>"); } }); } return false; }); });
How and what can I do to allow this form to insert into SQL Database?
I'd like to insert into SQL their emailaddress, IP, date and referral page....
Thanks for anyone that can help!
Comment