This is a continuation from my other post "Why isn't this code working", but it seems that I have narrowed down the problem to the not operator.
Rather than reiterate it all here, please just go to that topic and check it out. It really should work and I can't figure out why it doesn't.
Right now I temporarily have the code:
Code: Select all
<?php
if ( $_SESSION['verified'] == "" ) {
header ("Location:http://www.mydomain.com/no_access.html");
// I have also used exit; here, but that didn't help either
}
?>Code: Select all
<?php
if ((!$_SESSION['user_name'] == "Bob") || (!$_SESSION['user_name'] == "Admin")){
header ("Location:$_SESSION[redirect]"); // A predefined complete URL, client-specific
}
?>So if you could read that topic and see any possible reasons why it doesn't work, or at the least an equally convenient way of achieving the second piece of code without using a !, put 'er 'ere!