Hello, I am looking to retreive a numerical value from the database
function adminLevel()
{
$q = "SELECT userlevel FROM ".TBL_USERS." WHERE id = '$_SESSION[id]'";
return mysql_query($q, $this->connection);
}
This is the SQL.
I then wrote the following php/html:
<?php
$q = $database->adminLevel();
if ($q > 7)
{
?>
<a href="newleague.php">Create a new league</a>
<?
}
?>
The problem I have is that the userlevel returned isn't affecting the if statement. It is always displayed. How do i get it to test the value of userlevel is greater than 7?
Thanks