Jump to content

[SOLVED] How to use (if) to check $var is $this OR $that


phpdragon

Recommended Posts

I am trying to figure out how to do this, could someone tell me how to perform a function that would do something similar to the following.

 

<?php if (($_SESSION["type"] != 'admin') OR ($_SESSION["type"] != 'reseller')) {
  header("Location: login_error.php");
  }
 ?>
           ////  rest page here if session type does equal either of above

if (($_SESSION["type"] != 'admin') || ($_SESSION["type"] != 'reseller'))

 

That says if ((session type does not equal admin) or (session type does not equal reseller))

 

if (($_SESSION["type"] == 'admin') || ($_SESSION["type"] == 'reseller'))

 

That says if ((session type is equal to admin) or (session type is equal to reseller))

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.