The easiest way I know to create a unique value for a web form that can be used as an ID in SQL is to make a datestamp and convert it to MD5
that create a long set of characters hat is both letters and numbers.
$Captured = date(“Y-m-d H:i:s”);//this sets the datestamp value to the Captured variable
$transID= md5($Captured);//this converts the value that Captures holds to a MD5 value ’55ff325fgd5dfasd5adh56dfg’
This is very quick to do and should be unique every second.