Jump to content

E-mail validation in php using e-mail account


utpal

Recommended Posts

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? ???

Link to comment
Share on other sites

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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.