note 30965 deleted from function.session-is-registered by didou

From: Date: Sun, 18 May 2003 03:47:10 +0000
Subject: note 30965 deleted from function.session-is-registered by didou
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-48394@lists.php.net to get a copy of this message
Note Submitter: jcastro@elnuevodia.com ---- It seems that you always have to call session_start() before calling session_is_registered. Otherwise session_is_registered will always return false. What you need to do is: session_start(); if (!session_is_registered("var_here")) session_destroy(); This way, you do not leave the session is the user is not logged in(for example). It will be nice just to be able to check with session_is_registered without actually creating a session.

« previous php.notes (#48394) next »