I'm writing a PHP program that produces two different kinds of output
depending on whether there is an active session.
I'm looking for a nice bit of code to do the initial checking.
This worked with register_global s=On :
if ($PHPSESSID) { session_start() ; }
but I'd prefer to run with register_global s=Off . Also, doing
session_destroy () didn't seem to unset $PHPSESSID.
I'm currently using 4.2.2, but I'd like to write something that is
compatible with later releases (if at all possible).
depending on whether there is an active session.
I'm looking for a nice bit of code to do the initial checking.
This worked with register_global s=On :
if ($PHPSESSID) { session_start() ; }
but I'd prefer to run with register_global s=Off . Also, doing
session_destroy () didn't seem to unset $PHPSESSID.
I'm currently using 4.2.2, but I'd like to write something that is
compatible with later releases (if at all possible).
Comment