Hello everyone !


  I'm building an online membership registration system, for a 'membership
  section' of a website. As it stands, I have a registration form that
  insert the data into MySQL, then generate a confirmation page--with member ID
  number, username, and password.

  I want to use PHP's mysql_insert_id to capture the last ID that was
  entered...and that's where my question lies.

  In an environment where it's possible to have multiple
  users register at the same time (relatively speaking), how can I be sure
  that the 'last ID' is indeed the 'intended' last user's ID?

   Say that user A submit a registration form at 00:00:01, but
   mysql_inserted_id is not called (for user A) until 00:00:03.

   If user B submits a registration for at 00:00:02, then would
   the call to mysql_insert_id (for user A---called at 00:00:03) return
   the ID for user B?

   Technically, it sounds like it would, unless mysql_insert_id implements
   some type of session and/or state recognition.
   Is that how it works?

   --How can I be sure that it returns the ID for user A and not B?

   --Does mysql_insert_id implement some internal session function, or
     something to that effect? How does it account for that?

  Please help.

  Thanks in advance.


__________John Monfort_________________
     P E P I E  D E S I G N S
"The world is waiting, are you ready?"

PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to