newbie: best way to check if there is a current session using php4 sessions?

From: Date: Tue, 17 Oct 2000 19:53:26 +0000
Subject: newbie: best way to check if there is a current session using php4 sessions?
Groups: php.general 
Request: Send a blank email to php-general+get-20699@lists.php.net to get a copy of this message
I am learning php4 sessions. I noticed that the way to check if there is a "current session" is not given clearly. Say I started a session after the guy signed in by session_start() and registered some variables. At some other page, I want to check if the user is signed in or not. Seems like I can use if ( session_is_registered("my_previously_registered_variable")) { // let the user see the page... or if ( SID ) { // let... or if (session_id()) { // let... How do I do it best? Thanks. Oguz.

« previous php.general (#20699) next »