hi All,
I hope someone can help me with this.
I have been struggling with it and searching for a solution, but I am such a newb that I am probably going about it all wrong.
If number exists in table pw_reg, generate a new random number and check again. Keep checking until an unused number is found.
else {
$randnumber = rand($rand1,$rand2);
$n_query ="SELECT * FROM pw_reg WHERE pcode='$randnumber'";
$n_result = mysql_query($n_query);
$numrows = mysql_num_rows($n_result);
if($numrows != 0) {
What do I put in here ?
}
else {
Pleeeese
Thom