note 26607 added to function.session-start
| From: | shred at rack1 dot php dot net | Date: | Wed, 06 Nov 2002 14:38:30 +0000 |
| Subject: | note 26607 added to function.session-start | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-39047@lists.php.net to get a copy of this message | ||
Maybe this is as useful to you as it is to me...
If you want to use an existing session, without creating a new session when there is none available
yet, you can use this code:
if(isset($_REQUEST[session_name()])) {
// There is a session already available
start_session();
}
(PHP 4.1.0 or higher is required.)
This is useful if you only want to create a session if you really need it (e.g. during a login
procedure), but keep the other pages free from any unnecessary cookie requests and use default
values if there is no session.
--
http://www.php.net/manual/en/function.session-start.php
http://master.php.net/manage/user-notes.php?action=edit+26607
http://master.php.net/manage/user-notes.php?action=delete+26607
http://master.php.net/manage/user-notes.php?action=reject+26607