I am trying to setup a user signup form, but I only want to let up to 24 users sign up and then no more -- I set this up, but the count does not seem to be working. Does anyone have any other ideas that I could use. I have even tried just printing the $count variable and it doesn't print that either.
Thanks,
Adam
<--!beginning of code!-->
<?php
$link = mysql_connect("localhost","tourney","tourneyrocks");
mysql_select_db("tourneys");
mysql_query("INSERT INTO players (username,emailaddy) VALUES('$username','$emailaddy')");
$count = mysql_query("select id from players where username = $username");
print "$count";
if ($count < 9)
{
print "$username, $emailaddy";
}
else
{
mysql_query("delete from players where username = $username");
print "Too many people -- sorry dumbass!";
}
mysql_close($link);
?>
<--!End of Code!-->