reth Posted October 2, 2008 Share Posted October 2, 2008 Hi Everyone, I was hoping that someone can help me out. I made a form and want it to only make emails work in it (have to type [email protected].) I am having issues with how to make it work. The code I have so far looks like this: <div id="unsubscribe"> <form id="form" name="form" class="rt" method="post" action=""> <input type="hidden" name="source" value="flash games" /> <fieldset> <label for="email1"> <span>Please enter your email address:</span> <input type="text" name="email1" id="email1" /> </label> <button class="submitBtn" name="button" id="button" type="submit"><span>Unsubscribe</span></button> </fieldset> </form> </div> Please let me know if any of you know the solution. Thanks, Reth Link to comment https://forums.phpfreaks.com/topic/126830-php-email-form-validation/ Share on other sites More sharing options...
unrelenting Posted October 3, 2008 Share Posted October 3, 2008 Just Google it. http://www.google.com/search?hl=en&q=javascript+to+validate+email+address&btnG=Google+Search&aq=f&oq= If you have to do it in PHP here is a function that you can use... http://www.spoono.com/php/tutorials/tutorial.php?id=41 Link to comment https://forums.phpfreaks.com/topic/126830-php-email-form-validation/#findComment-656081 Share on other sites More sharing options...
JasonLewis Posted October 3, 2008 Share Posted October 3, 2008 Validating e-mail addresses in PHP is a very sensitive area because there are so many incorrect ways of doing it. Here is a really good article explaining how to validate e-mails the right way. Also check out this e-mail address validation script. Link to comment https://forums.phpfreaks.com/topic/126830-php-email-form-validation/#findComment-656114 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.