I am developing an online examination system using php and I wish to incorporate a feature such that anyone who intends to take a test provides an email and a unique url link shall be sent to their email. On clicking the link the user shall be logged into the system and can take a test. The url link should expire after the duration of exam is completed or in other words the link should be active only for a fixed time duration after it is first clicked.
In this case I do not require the user to provide any details except his email.
Use a hash like md5 or sha1 or something similar. When they fill in the form you will save their record to a database with a record id and their address. The link should have a hash of their record id so that you can easily look up the record when they click the link:
Then when processing the link: