note 67005 deleted from function.session-id by bjori

From: Date: Fri, 02 Jun 2006 06:35:58 +0000
Subject: note 67005 deleted from function.session-id by bjori
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-112889@lists.php.net to get a copy of this message
Note Submitter: blackhorse Reason: integrated ---- 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 }

« previous php.notes (#112889) next »