This is what i wrote but it does not work. I tried to print out hte query and it does have to right values being SELECTED. I have 6 rows in my dba but it still shows the ADD RUNNER am i doing something wrong. I am attempting to have the ADD RUNNER display when there are less than 5 rows in the dba if the user adds another row the ability to add more will not be displayed.
<?php
$loggeduser = $_SESSION['id'];
$row = "SELECT count(*) FROM highschool WHERE user_id = '$loggeduser' AND invitational = 'm'";
$result = mysql_query($row);
if(mysql_num_rows($result) < 5)
{
?>
<p align="center"><a href="add_runner_limit.php?invite=<?php echo m;?>&gender=<?php echo m;?>">Add Runner</a></p>
<?php
}
?>