Okay let i guess this is what you want....not sure but it might help you...
when user fills a registration form and hit submit button. You probably do insertion in DB, when you do insertion get the last inserted id. and store it in variable let say '$userid'. Make link in the email that you will send to the user and that link will contain that last inserted id e.g the link might look like this.
- <a href='http://yoursite.com/authentication.php?userid=$userid'>Click Here</a>
Make sure to encrypt $userid before using it in the above link.
When user click on this link that link will bring user to authentication.php. Here first you will decrypt $userid and then find this ID in your DB. If you find a record set then user will be authenticated and you can set his/her status as verified user. and refdirect to THANK YOU page or Login page. what ever you want.
Hope this helps you.