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="[email protected]"> <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 regards Manicui Link to comment https://forums.phpfreaks.com/topic/88976-what-is-the-code-for-stopping-second-subscription/ Share on other sites More sharing options...
phpQuestioner Posted February 1, 2008 Share Posted February 1, 2008 DON'T DOUBLE POST! http://www.phpfreaks.com/forums/index.php/topic,179223.0.html You can also do something simple and disable the button onsubmit. Link to comment https://forums.phpfreaks.com/topic/88976-what-is-the-code-for-stopping-second-subscription/#findComment-455657 Share on other sites More sharing options...
moneytree Posted February 1, 2008 Author Share Posted February 1, 2008 Hi phpQuestioner, I am sorry for it and thanks for your recommendation for the web site which I can learn the code. Have a nice weekend. Thank you. Best regards Manicui Link to comment https://forums.phpfreaks.com/topic/88976-what-is-the-code-for-stopping-second-subscription/#findComment-455680 Share on other sites More sharing options...
phpQuestioner Posted February 1, 2008 Share Posted February 1, 2008 You have a good weekend too. Good Luck with your adventure into server side language. Link to comment https://forums.phpfreaks.com/topic/88976-what-is-the-code-for-stopping-second-subscription/#findComment-455681 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.