Ok... I'm having a severe brain fart here.
I have a dbase that holds a table of usernames, pwords...., a table named prj_mgr_permissions with usernames (foreign key to users table), a table named user_permissions with the same... Different users are in each of those tables.
Now, when a user logs in and their username is within the prj_mgr_permissions table I want them to see one thing... All others will see something different.
Problem I'm having is that it seems that every username I log in as (in setup errr learning phase here) sees the same stuff.
Code I thought would work is
$prj_mgr = $handle->query("select username from prj_mgr_permissions
where username='{$_SESSION['auth_user']}'");
if ($prj_mgr)
{
echo $_SESSION['auth_user'];
echo 'You are a Project Manager';
echo '[<a href="admin/logout.php">Logout</a>]';
echo '<br />';
}
else
{
echo 'Sorry, you are only a poor user';
echo '[<a href="admin/logout.php">Logout</a>]';
echo '<br />';
}