How Email Verification works on Registration.

How Email Verification works on Registration in PHP

Users can register using any Email on any website. But all the websites verify these emails by sending an email with an activation link.

What happens exactly behind the scene is quite simple.

Login of Email Verification illustrated in diagram.

a. User Register by filling a form.

b. The information which he fills is store in a table along with a random generated code.

c. An Email Verification mail is sent to the user that contains a Verification link which is advised to be clicked.
This link looks similar to the following.
http://your-site.com/verify_email.php?email=a@a.com&unique_code=xy13z

d. When user clicks on this link the page request is sent and the code and the email is sent as GET variables.

e. When server receives this URL request it can check the email and unique code in the database for a match.

f. If a match is found the column containing the email verification status is updated and the user may be redirected to the login page.

That’s it. ?