LOUDMOUTH Posted July 31, 2009 Share Posted July 31, 2009 I want to make this code so admin 1 and admin 2 can view this area. right now it is set to only display for admin 2 category. Can someone help me make it so that admin 1 and 2 can view it but not admin 0. if ($user_class->admin != 2) { echo Message("You are not authorized to be here. YOU MOTHERFUCKER"); include 'footer.php'; die(); } I can provide more info if needed, thanks in advance! Quote Link to comment Share on other sites More sharing options...
dadamssg Posted July 31, 2009 Share Posted July 31, 2009 <?php if($user_class > 2){ echo Message("You are not authorized to be here. YOU MOTHERFUCKER"); include 'footer.php'; die(); } or <?php if($user_class < 1){ echo Message("You are not authorized to be here. YOU MOTHERFUCKER"); include 'footer.php'; die(); depending on the number of the class of a normal user is Quote Link to comment Share on other sites More sharing options...
rhodesa Posted July 31, 2009 Share Posted July 31, 2009 if ($user_class->admin != 1 && $user_class->admin != 2) { echo Message("You are not authorized to be here. YOU MOTHERFUCKER"); include 'footer.php'; die(); } Quote Link to comment Share on other sites More sharing options...
LOUDMOUTH Posted July 31, 2009 Author Share Posted July 31, 2009 Thanks guys I have too many categories of staff to use the > or < dadamssg. This works perfect though, thank you both, dadamssg. and rhodesa! if ($user_class->admin != 1 && $user_class->admin != 2) { echo Message("You are not authorized to be here. YOU MOTHERFUCKER"); include 'footer.php'; die(); } Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.