What About This:
When Lisence Is Issued:
$lis_rand_a = rand(0, 1200);
$lis_rand_b = rand(34, 1919);
$lis_rand_c = rand(98, 9999);
$lis_rand_d = rand(1300, 89230);
$lis_rand_e = rand(9000, 100900);
$lis_rand_Final = rand(8, 10);
$new_lisence = ($lis_rand_a+$lis_rand_b+$lis_rand_c+$lis_rand_d+$lis_rand_e);
$new_lisence = ($new_lisnece*$lis_rand_Final);
$select_lisences = mysql_query("SELECT * FROM table WHERE lisencenum='$new_lisence'");
$count_lis = mysql_num_rows($select_lisences);
if($count_lis >= "1")
{
$lis_rand_a = rand(0, 1200);
$lis_rand_b = rand(34, 1919);
$lis_rand_c = rand(98, 9999);
$lis_rand_d = rand(1300, 89230);
$lis_rand_e = rand(9000, 100900);
$lis_rand_Final = rand(8, 10);
$new_lisence = ($lis_rand_a+$lis_rand_b+$lis_rand_c+$lis_rand_d+$lis_rand_e);
$new_lisence = ($new_lisnece*$lis_rand_Final);
$select_lisences = mysql_query("SELECT * FROM table WHERE lisencenum='$new_lisence'");
$count_lis = mysql_num_rows($select_lisences);
}
else
{
echo "New Lisence Aqquired!";
mysql_query("UPDATE table SET lisence='$new_lisence' WHERE account='$account_from_session_or_whatever'");
}
I Have To Go, But You Get The Picture?