There's a couple ways to do it I suppose. Upon successful registration you could create a random number or use time() or microtime() and store the value in a variable. You could then write that variable to the database record(s) pertaining to your new applicant, and then e-mail it simultaneously. Before you do that, create a script to validate this e-mail link. In the email just create a link such as http://yoursite.com/validuser.php?email=new@email.com&checkvar=1022214415 for example. Then just use the following query:
select id from table where email = '$email' and checkvar = '$checkvar'
If you get back a result, prompt for the rest of the information, then update the record with the id you got back. For records that get updated you might write a cron job to delete records that are missing the rest of the information after a certain period of time.
This is just one method that might work. You might want a second or third opinion ;-)
mt78 wrote:
Currently,i write a site with PHP and mySQL to create a online parttime job seeking website.And when a people want to seek their parttime,he need fill up a form by write down his user name,email address,and some his personal information.Afterward,we want to check his email address is vaild or not,so we will send a email to his email address and show upp a random url which poin to the page for him to continute to fill in his resume.
The question is how can i write a code to generate a url which is unique to the user.
Thank you very much for help.