note 36590 deleted from function.session-id by betz
| From: | betz@php.net | Date: | Fri, 08 Jul 2005 17:15:56 +0000 |
| Subject: | note 36590 deleted from function.session-id by betz | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-91687@lists.php.net to get a copy of this message | ||
Note Submitter: Cybertinus
----
As of php 4.3.3 you get a notice when you start an session twice. You can use session_id() to detect
if a session is already started. Before you can make a script, you must know that session_id()
returns false when no session ID is known. So now we can make a script witch dectect if a session is
started, and if it is not, it startes an session. This is what you get then:
<?php
if(!session_id()){
session_start();
}
?>
I hope somebody can use this information.
Greetz, Cybertinus