Not dirrectly related to sessions, but you might enjoy the following piece
of code:
$f = 'HTTP_' . $HTTP_SERVER_VARS["REQUEST_METHOD"] . '_VARS';
Then if someone submits the field "username" you can refer to it as
${$f}["username"], and it will work if they used POST or GET.
--
Plutarck
Shoul
If you disable register_globals, use $HTTP_SESSION_VARS as normal variable.
For example,
$HTTP_SESSION_VARS['counter'] = 0;
unset($HTTP_SESSION_VARS['counter'];
isset($HTTP_SESSION_VARS['counter'];
No register()/unregister()/is_registered, is required.
Regards,
--
Yasuo Ohgaki
""Barraud, Stép
Hi all,
I'm using PHP 4.0.4pl1 on windows as CGI.
I try to avoid to use register_globals = On.
In my script I use only $HTTP_*_VARS variables to access forms fields.
The problem is when I set register_globals = Off in php.ini, the session is
not working any more, loosing session variables cont