I have a user registration process in which I send an email to the user for email verfication and to activate their account. Now when the activate link from the email is clicked, How do I get the referrer that tells me whether or not the user came to the page by clicking the link from the email?
I have a user registration process in which I send an email to the
Share
Before you generate the email, you generate a unique token for that user. Then you’d append that token to the URL, and the page that does the verification checks the username and the verification token. If they match, then the user has verified their email.
For example, your email would contain a link to
http://www.example.com/process.php?user=foo&validate_token=bar. Then yourprocess.phppage would check to make sure that thefoouser’s validation token is actuallybar. If it is, then the userfoohas had their email address validated.