Voyager Posted January 21, 2007 Share Posted January 21, 2007 Hi I'm building a website and, I have a form where the visitors insert their name and email address to download free content.What I need is a script to handle that form in the following way:1-Validate the name and email address;2-Post one email to visitor with a link to confirm email given; [i](if possible random generated link)[/i]3-If visitor confirms write his name and email address to my database;4-After confirmation redirect visitor to a download page.After serching through dozens of scripts I didn't find anything specific for my needs. Any help will be greatful.I'm willing to pay for a good script.Thanks Quote Link to comment https://forums.phpfreaks.com/topic/35055-email-validation-link-help/ Share on other sites More sharing options...
hackerkts Posted January 21, 2007 Share Posted January 21, 2007 It's best to write the script yourself, because you can configure it to your needs.You can read on this article how to valid email address, http://www.devshed.com/c/a/PHP/Email-Address-Verification-with-PHP/1/In your database add another column as status, default value = 0, once a user registered their account you send them an email to validate their acc, once they validate change the status to 1.P.S: This just a rough idea how it works. Quote Link to comment https://forums.phpfreaks.com/topic/35055-email-validation-link-help/#findComment-165401 Share on other sites More sharing options...
Ninjakreborn Posted January 21, 2007 Share Posted January 21, 2007 [code]<?phpfunction validateemail($email) { global $errorhandler;// set regular expression to test email if ($email == "") { $errorhandler .= "The email address was left blank.<br />"; } $regexemail = "^[A-Za-z0-9\._-]+@([A-Za-z0-9][A-Za-z0-9-]{1,62})(\.[A-Za-z][A-Za-z0-9-]{1,62})+$"; if (!ereg("$regexemail", $email)) { // test for formatting $errorhandler .= "The email address is improperly formatted<br />"; }}?>[/code]That function will deal with your validation, now as for confirmation you can save a code in the database, pass the email address an email with a link in it, containing the code dynamically. If that code comes back and matches the database, they are authorized, or give them a link to a pre-login area just to authorize, so you know they came from a real email address. Also putting in a captcha will also add extra security. Quote Link to comment https://forums.phpfreaks.com/topic/35055-email-validation-link-help/#findComment-165404 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.