what i'm trying to do is
Code:
a b a xor b no*(a xor b)
TRUE FALSE TRUE FALSE
FALSE TRUE TRUE FALSE
FALSE FALSE FALSE TRUE
TRUE TRUE FALSE FALSE
it's basically making sure that either $_REQUEST['p'] or $_REQUEST['postid'] exist, but never neither.
to simplify it, you'd use
PHP Code:
if (!(($_REQUEST['p'] AND !$_REQUEST['postid']) OR (!$_REQUEST['p'] AND $_REQUEST['postid'])))
* no a xor b as opposed to NOT a xor b
Quote:
Originally Posted by nexialys
you... remembered this thread... seriously ?!... 3 years back... damn, how big is your backup ?
|
lol, funnily enough, i can barely remember where i put my keys but this thread stuck with me.
having just tested it, the exclaimation kills it, so it's now
PHP Code:
if (is_array($_REQUEST) AND ($_REQUEST['p'] XOR $_REQUEST['postid']))