Technex Posted July 16, 2007 Share Posted July 16, 2007 if ($userinfo[level]<=5 and >=1){ Hey guys I know the above code is invaulied I just need help correcting it. I've tried if ($userinfo[level]<=5 && >=1){ but it doesn't work. Thanks. What I want is to check to see if a users level is under 5, but to make sure that banned members (0) and guests (1) don't get to see it either. The fastest most secure code please . Thanks . Link to comment https://forums.phpfreaks.com/topic/60166-solved-if-userinfolevel1/ Share on other sites More sharing options...
dooper3 Posted July 16, 2007 Share Posted July 16, 2007 try changing it to... if (($userinfor[level] <= 5) AND ($userinfo[level] > 1)) you said that you don't want guests getting in either, so i've gotten rid of the = sign by the 1, so the user must now have a level that is less than or equal to 5 and greater than 1 (i.e. 2,3,4 or 5). Hope that helps. Link to comment https://forums.phpfreaks.com/topic/60166-solved-if-userinfolevel1/#findComment-299340 Share on other sites More sharing options...
Technex Posted July 16, 2007 Author Share Posted July 16, 2007 Wow thanks very much . Yes that's what I meant it's just that when I posted it I thought why not include guests aswell . Thank you very much, P.M me if you wish to see site . Link to comment https://forums.phpfreaks.com/topic/60166-solved-if-userinfolevel1/#findComment-299341 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.