Could someone help me with some sample syntax of how i would check a column for 4 or more of the same value?
It’s to stop someone who has invited 3 people to the site and is trying to invite a 4th + member. Here’s some of my error checking in the script.
[php]$sql_logincount_check = mysql_query(“SELECT userid FROM inviter
WHERE userid=’$userid’”);//I think the $userid would probbly have to be replaced with something that makes it check for 4 or more of the same userid (a user id can only show up 3 times, so 4 or more would be not alloud)
$logincount_check = mysql_num_rows($sql_logincount_check);
if(($logincount_check > 0)){
echo "Please fix the following errors:
";
if($logincount_check > 0){
echo “You may NOT invite more than 3 members!
”;
unset($newmemberemail);
}
include ‘login_form.html’; // Show the form again!
exit();
} [/php]
So how would i be able to get the $userid in the first line to check for 4 or more of the same thing?