Change AND
to &&
if($user['id']=='1' && (($_GET['f']=='f-ppas') || ($_GET['f']=='f-kua'))){
.....
}
The AND
operator has some precedence problems.
$this = true;
$that = false;
$truthiness = $this and $that;
$truthiness
above has the value true
. Why? =
has a higher precedence than and. The addition of parentheses to show the implicit order makes this clearer:
($truthiness = $this) and $that
If you used &&
instead of and
in the first code example, it would work as expected and be false.
Reference: 'AND' vs '&&' as operator