Horrible thread title, but again would know how to word it... moving on.
Is there something in PHP that would allow me to be a bit more divers about a if condition and its deciding factor on the fly?
For instance I want to do a security check and make sure that anyone who has not be set with a authorized SESSION username will be redirected if the variable "pageName" equals any of the following. Something like this maybe?
Thanks for your time.
Is there something in PHP that would allow me to be a bit more divers about a if condition and its deciding factor on the fly?
For instance I want to do a security check and make sure that anyone who has not be set with a authorized SESSION username will be redirected if the variable "pageName" equals any of the following. Something like this maybe?
PHP Code:
if(!isset($_SESSION['username']) && $pageName=="this"||"that"||"theOther"||"anythingElse")
{
header('Location: [url]http://www.website.com/home.php');[/url]
}
Comment