Forum Moderators: coopster
the reason that the example you posted didn't work is you had an extra set of (), this would have worked:
if ($_GET["from"]) {
Sorry, but that isn't true. Parens should not effect things.
if ($x==$y && $a==$b)
is the same as
if (($x==$y) && ($a==$b))
As another example,
[pre]
$var['index'] = TRUE;
if (($var['index'])) {
echo "((TRUE)) evaluates as TRUE\n";
} elseif((!$var['index'])) {
echo "((TRUE)) evaluates as FALSE\n";
} else {
echo "((TRUE)) has problems\n";
}
var_dump($var['index']);
[/pre]
Yields:
((TRUE)) evaluates as TRUE
bool(true)
Tom
HTTP GET variables: $_GET
Note: Introduced in 4.1.0. In earlier versions, use $HTTP_GET_VARS.
h**p://www.mysite.com/myphpscript.php?from=myvalue
from in the GET superglobal.