ok, i am looking for your (yes you!) opinion on this method of determining a unique visitor. i am just looking for an alternative to session variables and/or cookies. what i need is to generate an order_id for each user that is unique (never will one be the same, ever!), and then all their file uploads will be associated with this order_id.
so what i did was create an order info table that had an auto_increment order_id field and another field for the date (to seconds)... and this is my script to generate a unique order_id.
the only problem i can think of is that if two users sign on to the system at the exact same second then this system has failed (but that is easy to check for). what are your opinions to this system and do you have any suggestions. all comments will be appreciated.
$order_time = date("n:d:Y G:i:s");
$sql = "INSERT INTO order_info (order_time, checked) VALUES ('$order_time', 'yes')";
mysql_query($sql,$conn) or die("could not create order id ".mysql_error());
$sql = "SELECT order_id FROM order_info WHERE order_time = '$order_time'";
$r = mysql_fetch_row(mysql_query($sql,$conn)) or die("could not select order id ".mysql_error());
$order_id = $r;