Posted by Rik on 01/03/07 00:45
Jeff wrote:
> 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?
>
> 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?
If you don't really care about people 'faking' it:
isset($_REQUEST[session_name()]):
Offcourse, use _before_ you call session_start();
--
Rik Wasmus
[Back to original message]
|