I like that idea the best... Just insert into your DB with their requested login name and password. Have a timestamp field AND a "registration completed" field or a "status" field. I used to do this for people who had registered but had not come back to the site to verify that they recieved their confirm email. No need for two tables -- just use one with a status field so you can say select * from user where status='regnotdone' and date_add(updated, interval 20 minutes)>now() This gives you all the users that have not completed their registration, and have not done anything to update their account in the last 20 minutes. Pick your time interval. "updated" is type timestamp. When they complete their registration, change the status to 'completed' or 'unverified' or something like that -- come up with as many statuses as you want. But don't use another table -- that's a waste. Besides, if you define "username" as a unique index, then your DB will prevent duplicate usernames -- always good. Peter On Tue, 3 Jun 2003, Gavin Amm wrote: > I'm inexperienced with db's, but here are my thoughts: > Maybe add a TIMESTAMP(14) field in your temp table, then run a script > periodically to delete any rows stored that are more than, say, 20 mins > old? > > Gav > > > -----Original Message----- > From: Dewi Wahyuni [mailto:xueh@lycos.com] > Sent: Tuesday, 3 June 2003 1:48 PM > To: php-db@lists.php.net > Subject: Reserve Username while Confirming Signup > > > Hi All, > > I have a sign up page and when the user submit, it goes to a > confirmation page, before the person actually submits. > > The confirmation page stores the username and password in the Session > variable and the submit page stores it into the database by getting it > from the session. The rest of the information (eg. address) is > resubmited via hidden input type. > > The question is : I want to reserve the username for the person(say A) > while he/she is in the confirmation page and perhaps going back to edit > some stuff. What is the best way to do that? > > > I tried putting it in my database in a Logintemp table. With the same > fields as the Login table. When the user submits, the Logintemp contents > is moved to the Login table. > > The problem is what if while A is staring at the screen the computer > hangs. How do I know if he/she closes the page altogether. I need to > delete the contents of Logintemp since it was not moved to Login. > > Is there any other better way to do this? > > > ____________________________________________________________ > Get advanced SPAM filtering on Webmail or POP Mail ... Get Lycos Mail! > http://login.mail.lycos.com/r/referral?aid=27005 > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > --------------------------------------------------------------------------- Peter Beckman Internet Guy beckman@purplecow.com http://www.purplecow.com/ --------------------------------------------------------------------------- -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php