> // connected to the database successfully and running this query: > { > mysql_query.........etc > $r=select max(cno)+1 from customer; > insert into customer values($r,'$name'); > } > print("Your customer number is: $r"); > > what do you think? And will this return the correct values if 2 people > submitted the form at the same time?
Nope...it'll mess up. You want to make that column an auto_incrementing column (assuming MySQL) that way you are guaranteed unique values. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php