amyb on 02/04/11
Last Edited at 02/04/11 03:04am
$unique = FALSE; while ($unique == FALSE){ $ref = md5(date('r', time()) . rand(0,100)); $check_ref = mysql_query("SELECT ref FROM table_name WHERE ref = '$ref'"); if(mysql_num_rows($check_ref)==0){ $unique = TRUE; } }
Report this snippet Tweet
Comment:
You need to login to post a comment.