Hi! On Freitag 07 September 2007, Alessandro De Zorzi wrote: > <?php > session_start(); > > if (isset($_GET["foo"])) > $_SESSION["foo"]++; > > echo $_SESSION["foo"]; > > $foo = 1; > ?>
This code works as expected with register_globals=off. But let me quote PHP manual: > Session variables: $_SESSION > [...] > If the register_globals directive is set, then these variables will also be > made available in the global scope of the script; i.e., separate from the > $_SESSION and $HTTP_SESSION_VARS arrays. > [...] So, if you say "$foo = 1;", PHP will read this as $_SESSION["foo"] = 1; because the session vars will be exported after GPC-Vars. idiot? ;-) greets, Roland _______________________________________________ suPHP mailing list [email protected] http://lists.marsching.biz/mailman/listinfo/suphp
