Forum Moderators: coopster
$query = "INSERT INTO pet VALUES ('id','$petfirst','$petmiddle','$petlast','$petsuffix','$petstreet','$petstreet2','$petapt','$petcity','$petstate','$petzip')";
mysql_query($query);
$ticketid=mysql_insert_id();
echo "$ticketid";
Is this safe/reliable if multiple users are on at the same time? Is there a chance that someone may get another users ID?
I was originally was doing the following:
1) write to database,
2) do a new query with some of the variables I entered into the database in step 1 and get the ID from that query
This seemed to be overkill.
thanks for your thoughts.
Fred
Tom