Posted by Ric on 01/03/07 00:29
Jeff schrieb:
> Hey
>
> I'm using php version 5.2.0
>
> I'm wondering how we can tell if session_start are resuming the current
> session id or if it just created a new session?
It doesn't create a new session if there is already a session, see PHP
manual page session_start:
"Note: As of PHP 4.3.3, calling session_start() while the session has
already been started will result in an error of level E_NOTICE. Also,
the second session start will simply be ignored."
>
> I know I could for example do a test like this: $_SESSION["valid_user"] ==
> NULL (not sure about the syntax).. but there must be a better way to
> determine if session_start() starts a new session or not?
>
> Jeff
>
>
[Back to original message]
|