Jump to content

[SOLVED] if ($userinfo[level]<=5 and >=1){ <_<;


Technex

Recommended Posts

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

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.