Code: Select all
echo $userLevel;
if($userLevel=="7"){
$isAdmin = True;
echo("isAdmin: " . $isAdmin);
}else{
$isAdmin = False;
echo("isAdmin: " . $isAdmin);
}
....some other stuff here....
if($isAdmin){
echo("Welcome to the Admin Area");
....buncha otherstuff...
}7isAdmin: 1
but I never get the "Welcome to the Admin Area" and the stuff below it.
If $userLevel = (anything else, usually 5 in my case), I get this for output:
5isAdmin:
but I also never get into the "Welcome to the Admin Area", which is correct.
My question is, why doesnt if($isAdmin) evaluate to true when $isAdmin is set to true, and why is $isAdmin empty when I try to set it to false?