What are the chances of md5 outputting same values. I cant think of anything, but want to get other opinions.
function theid(){
$rand = random_int("1000000","9999999");
$idcont = date("d.m.Y").$rand.time("h:i:s").$rand;
$sysid = md5($idcont);
return $sysid;
}
$oneid = theid();
it does not hash pass I'm using it to generate unique ids for my system. Checking each id is not a good option as id will be stored in different places.
CONCLUSION. Thanks all. By comments in this post i had to sit back and rethink how id are carried true system. I will cut back on using auto_increment for user id, use uniqid() to handle system events and use something like hash_password() for other part i did not even touch here. Better pull my sleeves up ...