so it only should work with the == sets and not the !=?
i ask because of this....
ripped form another forums wrote:Okay then... I *think* you should be using the cookie or session variables there. Unless you have $sa = $_COOKIE[sa]; or something?
Also, while this is awfully vague, I found I had to be really careful to get all the information in the right order. I didn't use variables for the check, but rather actual things.
So:
PHP:--------------------------------------------------------------------------------
if ($_SESSION[adminaccess] != ('admin'||'moderator')) {}
--------------------------------------------------------------------------------
Check to make sure your $a1 et cetera variables make sense, too. (I'm not saying you can't use variables, I don't know.) And make sure that $sa is really being passed along in the cookie or session by doing this:
PHP:--------------------------------------------------------------------------------
if (isset($sa)) {
echo $sa;
exit;
}
--------------------------------------------------------------------------------
And then you'll know for sure.
and my response to her:
actually i pull it out of the db at the begining of each function when i double check everyone is authorized (by username and pw which is in cookies)
and i already echoed out to make sure that
1: $sa is being set right
2: the variables i check against are set right
and i found in all instances that they were, php was just being funky about letting me through. in some cases it acted as if if($sa==($jra||$adm||$wbm)) correctly, in other times it didn't (the check to see if you can do that function does == and theone to see which level you have within the function is !=)
so i don't understand why it seems to work sometimes (most of the ==) and not others (some of the == and all of the !=) and when i change it to (($sa==$jra)||($sa==$adm)||($sa==$wbm)) is echos out right yet tells me i don't have access, and when i switch that back i have to mae the other one (== or !=) to be individual to work right (instead of just doing the first one regaurdless of if that's right)