01-11-2010, 06:16 PM
Hello,
I'm trying to create a some-what simple user access level system. What I want, if is a user with the access level of "1" logs in, it will display something. If a user with the access level of "2" logs in, they don't see it.
Here's what I have so far, but can't get it to work.
Thanks
I'm trying to create a some-what simple user access level system. What I want, if is a user with the access level of "1" logs in, it will display something. If a user with the access level of "2" logs in, they don't see it.
Here's what I have so far, but can't get it to work.
PHP Code:
<?php
$connect = mysql_connect("localhost","--removed--","--removed--");
mysql_select_db("--removed--", $connect);
$result = mysql_query("SELECT * FROM users");
while($row = mysql_fetch_array($result))
{
$level = $row['group'];
}
if($level==1)
{
echo "<div class='tabbertab'>";
echo "<h2>Tools/Settings</h1>";
echo "<div id='chat'>";
echo "</div>";
echo "</div>";
}
if($level==1)
{
echo "<div class='tabbertab'>";
echo "<h2>User Management</h1>";
echo "<div id='chat'>";
echo "</div>";
echo "</div>";
}
?>
Thanks