note 21362 deleted from function.session-start by didou

From: Date: Sun, 18 May 2003 04:15:11 +0000
Subject: note 21362 deleted from function.session-start by didou
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-48404@lists.php.net to get a copy of this message
Note Submitter: ying@bcgsearch.com ---- I have learned the following lessons on session_start(): 1. On each page you wish to use session variables, you have to call session_start() first. 2. Only the first time you create a session, session_start() has to be called before <html> tag, as mentioned in some notes above. This does not apply to subsequent session_start() calls to reactivate an existing session. 3. Contrary to some comments above, once a variable is registered as a session variable, the variable is global. Wherever its value is changed, the variable is going to keep the most updated value across pages. (I am not referring to functions though, which would be different because of scope issues.)

« previous php.notes (#48404) next »