Hi,
I've written this line of code
if(!$GLOBALS['activated'] && !ereg("activate.php", $GLOBALS['PHP_SELF']) && !ereg("coppa_activate.php", $GLOBALS['PHP_SELF'])) { $var = 1; } else { $var = 0; }
Now if I take out the && ereg part off the end (so it's just if($GLOBALS['activated']) { ) then it works absolutely fine. But with the two && (AND) to check if it's not activate.php and coppa_activate.php. I want it to only do what's in the if() if it's NOT activate.php or coppa_activate.php. Any ideas?
Thanks
Max
EDIT: I tried it with just $PHP_SELF instaled of $GLOBALS['PHP_SELF'] too. The reason I'm using $GLOBALS is coz it's within a function and wasn't sure if that applies to $PHP_SELF too. With $PHP_SELF or $GLOBALS['PHP_SELF'] gives the same result.