On Sunday 19 January 2003 09:03, Justin French wrote: > on 19/01/03 9:59 AM, John W. Holmes ([EMAIL PROTECTED]) wrote: > >> Is there a way for a php page to automatically increment a number and > >> store > >> it every time the page is loaded. > >> > >> I want to generate an invoice number that goes up 1 everytime the HTML > >> form > >> is sent to it. > > > > I assume you're talking about incrementing for everyone that accesses > > your site. For that you need a database to keep track of the number for > > all users. > > Or use a file-based counter. There are 1000's of counter scripts out there > both file based and database based.
If the application is mission critical then a simple file based counter is wholly inadequate. There are issues of concurrent access -- two or more instances of the script trying to read and write to the file at the same time. Using a DBMS means this problem is handled automatically and reliably. -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* SEMPER UBI SUB UBI!!!! */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php