utpal Posted March 3, 2008 Share Posted March 3, 2008 Hi, I am designing a web site. I want the users to register on my site. After registering, the user gets an e-mail having a link with a token number sent by the administrator. When he selects the link he should be redirected to his account on the website. Please help. How should I start? ??? Quote Link to comment Share on other sites More sharing options...
shocker-z Posted March 3, 2008 Share Posted March 3, 2008 What i normaly do for this is have a form for them to fill out, then after submitting it will go to a validation oage where i check for empty field and send them back if empty. After i've checked for this i will create there information in a table e.g. username password email name. As well as that i create an activation field in which i insert the value of $valcode=md5($email.date('Y-m-d G:i:s:u')); this will create a unique validation code for every user even if same email address or submitted twice (you ahould check for duplicate email addresses in your validation also) email them there validation coe in the form of http://www.somesite.com/validate.php?code=$valcode then in your validate.php file you select from db where activation = $_GET['code'] and ask for password and validate against that also. Once validated then set activation to NULL and then all you do on login is check to see if activation is null and if so then account is activated properly. Very brief but hope it helps. Regards Liam Quote Link to comment Share on other sites More sharing options...
utpal Posted March 4, 2008 Author Share Posted March 4, 2008 It can be done without using the db. Better give the md5 code of the userID with the link. Regards Utpal Quote Link to comment 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.