I think you're talking about getting a verification email.
You can create a table that contains "unverified" user accounts. You can generate some string to act as a "verification code" for the user. Put the user details plus this verification code in the unverified users table.
The user will get an email and click on a link that contains both the user ID (or email address) and the verification code. These two items are looked up in the verification table and if there is a match, the user account details are moved from the unverified users table to the active users table.