moneytree Posted February 1, 2008 Share Posted February 1, 2008 Hi,May I know what is the code for stopping peoples from second subscribe to my opt-in for the same newsletter ?The follwoing is my webform code for your review and advice :<script language="javascript">function verify(){var first = document.myform.realname.value;var last = document.myform.lastname.value;var email = document.myform.email.value;var errors1 = "";var errors2 = "";var errors3 = "";var message="Please complete the following field(s): \n";if (first.length == "0") {errors1="First name\n";}if (last.length == "0") {errors2="Last name\n";}if (email.length == "0") {errors3="email address\n";}if (errors1.length >= "1" || errors2.length >= "1" || errors3.length >= "1") {alert(message + "\n\n" + errors1 + errors2 + errors3);}else {document.myform.submit();}}</script><div id="formbox"><h3>Free E-book for today ! </h3><p>" SEO MADE EASY " (Worth $89)</p><center><img src="http://moneymakeyourich.com/images/seo_opt_made_easy_small.jpg"></center><form name="myform" METHOD="post" ACTION="http://moneymakeyourich.com/cgi-bin/formmail.pl"><input type=hidden name="recipient" value="moneytree@moneymakeyourich.com"><input type=hidden name="subject" value="Your Subject">First Name :<input type=text name="realname" size="20">Last Name :<input type=text name="lastname" size="20">Email :<input type=text name="email" size="20"><center><input type="button" value="Yes,I want it !" onclick="verify()"/></center></form>Thank you.Best regardsManicui Link to comment Share on other sites More sharing options...
Synook Posted February 2, 2008 Share Posted February 2, 2008 You will need to use cookies to make sure the form is only displayed if they haven't signed up. Then, on the form processing page, you can set the cookie.http://www.w3schools.com/js/js_cookies.asphttp://www.w3schools.com/php/php_cookies.asp Link to comment Share on other sites More sharing options...
moneytree Posted February 2, 2008 Author Share Posted February 2, 2008 Hi Synook,Good day to you and nice to hear from you again.Many thanks for your recommendation for the cookies site,it really helped me to understand clearly on this issue.I am learning now and will post question again should I need your advice.Have a nice weekend.Thank you.Best regardsManicui Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.