Gossamer Forum
Home : General : Internet Technologies :

Re: [Lee] PHP Reserving Incremental Numbers

Quote Reply
Re: [Lee] PHP Reserving Incremental Numbers In reply to
Does the user need to do anything with the number? Do they ever see that data or is it hidden?

Don't assign this data until after these requirements are met:
1) the user submits the form
2) the form passes any required validation checks

Then, and only then, you should:
3) assign the incremental number at the time of insertion into your database

That is really the only way to do it to avoid skipping numbers and prevent users from duplicating the assigned number.

Philip
------------------
Limecat is not pleased.
Subject Author Views Date
Thread PHP Reserving Incremental Numbers Lee 5341 Sep 1, 2005, 7:17 AM
Thread Re: [Lee] PHP Reserving Incremental Numbers
fuzzy logic 5164 Sep 1, 2005, 8:17 AM
Thread Re: [fuzzy logic] PHP Reserving Incremental Numbers
Lee 5166 Sep 1, 2005, 8:54 AM
Post Re: [Lee] PHP Reserving Incremental Numbers
fuzzy logic 5149 Sep 1, 2005, 9:00 AM