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! Link to comment https://forums.phpfreaks.com/topic/168280-solved-small-problem/ 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 Link to comment https://forums.phpfreaks.com/topic/168280-solved-small-problem/#findComment-887596 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(); } Link to comment https://forums.phpfreaks.com/topic/168280-solved-small-problem/#findComment-887597 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(); } Link to comment https://forums.phpfreaks.com/topic/168280-solved-small-problem/#findComment-887602 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.