Haha I forgot to auto_increment the id field for this table...
It works good now. The only thing is if I have this line:
$random_number = rand(2,4);
Then after 3 entries, 2, 3 and 4 get used up and the 4th entry times out after 30 seconds. Instead of timing out, can I display an error message of "Broaden your random number range to enter more data"?
Thanks guys for all your help. I really appreciate it.