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
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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.