Friday, March 31, 2006

What if Activation Links in Emails dont work?

When people register on your site and you decide to send them an email with an activation link to click thereby confirming their email address, sometimes it doesnt work. Well clicking on the link might give an HTTP 404 error. Why? It can be because the link is displayed on two lines rather than one.

For example, if your link is something like this http://www.blabla.com/register.php?username=myblabla&activation_code=ARHG878787, it might be displayed on two lines as follows in certain email programs:

http://www.blabla..com/register.php?username=myblabla
&activation_code=ARHG878787

Even if the user has selected the two lines, the clipboard might be copying just the first line (dont ask me why now). So unless the user copies the first line, paste in the address bar and does the same for the second line, the link wont work!!!

Solution is to have a simple link like:
http://www.blabla..com/register.php

Then ask the user to type in the username and the activation code which you gonna provide in the email. Your register.php page need only have 2 fields, username and activation code and upon successful entry activates the account for that user.

No comments: