View Single Post
Old 04-04-2010, 08:03 PM   #3 (permalink)
SaintIsaiah
The Contributor
 
SaintIsaiah's Avatar
 
Join Date: Jan 2009
Posts: 48
Thanks: 5
SaintIsaiah is on a distinguished road
Default

Well I just got it working. Here's what I did:

PHP Code:
$usernamesql $userinfo['username'];

$getugroup $DB->query("SELECT * FROM {users} WHERE username = '".$usernamesql."'");

$ugroupids $DB->fetch_array($getugroup);

$ugroupid $ugroupids['usergroupid'];

echo 
$ugroupid
The $DB variable was already defined as well. I guess it was just a syntax error.

What I did was pretty much used an if/else statement to show what info a user is allowed to see based on what usergroup they're in.

PHP Code:
if (($ugroupid != '1') && ($ugroupid != '6') && ($ugroupid != '7') && ($ugroupid != '8'))  {

//Restricted Access

} else {

//Full Access


It works, but I was wondering how to make an if statement that will check all of those group id numbers at once, like an if array statement. That possible?
SaintIsaiah is offline  
Reply With Quote