Checking if session has been started

From: Date: Sat, 22 Sep 2001 15:05:56 +0000
Subject: Checking if session has been started
Groups: php.general 
Request: Send a blank email to php-general+get-68327@lists.php.net to get a copy of this message
Hi I need to run some code if a session has been started. However, to do this, I need to figure out IF the session has been started at all. How can I do this? Is checking for the count of elements in HTTP_SESSION_VARS the only reliable way of doing this? Like so? <?php if (0 < count($HTTP_SESSION_VARS)){ // Do something since a session is already running } ?> Thanks, Alexander Skwar -- How to quote: http://learn.to/quote (german) http://quote.6x.to (english) Homepage: http://www.digitalprojects.com | http://www.iso-top.de iso-top.de - Die günstige Art an Linux Distributionen zu kommen Uptime: 3 days 3 hours 9 minutes

« previous php.general (#68327) next »