note 67005 added to function.session-id

From: Date: Fri, 02 Jun 2006 06:25:19 +0000
Subject: note 67005 added to function.session-id
Groups: php.notes 
Request: Send a blank email to php-notes+get-112884@lists.php.net to get a copy of this message
in the note from jpjounier: Should it be session_start(); instead of start_session(); ----- About the note from Cybertinus : The following test doesn't work, the code following is always executed : if(!session_id()) { // Always executed even if there's already an opened session } session_id() returns an empty string if there is no current session, so to test if a session already exists, it's better to write this : if(session_id() == "") { session_start(); //in jpjounier's note it is start_session(); } else { // Anything you want } ---- Server IP: 216.235.15.211 Probable Submitter: 64.59.144.24 (proxied: 24.83.61.2) ---- X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER autolearn=no version=2.64 ---- Manual Page -- http://www.php.net/manual/en/function.session-id.php Edit -- http://master.php.net/note/edit/67005 Del: integrated -- http://master.php.net/note/delete/67005/integrated Del: useless -- http://master.php.net/note/delete/67005/useless Del: bad code -- http://master.php.net/note/delete/67005/bad+code Del: spam -- http://master.php.net/note/delete/67005/spam Del: non-english -- http://master.php.net/note/delete/67005/non-english Del: in docs -- http://master.php.net/note/delete/67005/in+docs Del: other reasons-- http://master.php.net/note/delete/67005 Reject -- http://master.php.net/note/reject/67005 Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#112884) next »