I am currently trying to check my db table to see if a user’s level is equal to or less than 10, if so then show an entire html list, if not and is equal or less than 5 show only the remaining part of the list. Here’s where I started:
<?php
$levels = mysql_query("SELECT level FROM users");
if ($levels <= 10) {
?>
html list
<?php
if ($levels <= 5)
?>
html list
<?php
}
?>
I am trying to wrap my head around it, I just can’t seem to get it.
Does that clear it up at all? You need to supply the ID of the current user, and then you need to actually retrieve the value from the $result. The $result is a variable of type resource, and you have to work on it with functions designed to do so.