Jump to content

[SOLVED] Need a OR statement for 2 numbers to be used.


$username

Recommended Posts

Hello Everyone,

 

  I have some code and I am trying to have an OR statement to have a value equal 2 numbers.

I cannot seem to get this to work. any help would be great

 

if ($username == $username2 && $usrrights == 120 OR $usrrights == 420) { 
echo "You do not have access to this page!";
} else {

 

Thank you,

Brett

Ok after looking into this. I find that If 120 or 420 do not equal then they can continue.

 

It seems to not work when I do this.

 

		if ($usrrights != "120" OR $usrrights != "420" ) { 
		echo "You do not have access to this page!";
	} else {

 

Thank you,

Brett

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.