note 26607 modified in function.session-start by philip

From: Date: Fri, 13 Dec 2002 18:07:16 +0000
Subject: note 26607 modified in function.session-start by philip
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-40872@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 session_start(); } (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. --was-- 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

« previous php.notes (#40872) next »