Re: Session updates ok first time only.

From: Date: Tue, 29 Jan 2002 00:49:06 +0000
Subject: Re: Session updates ok first time only.
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-82496@lists.php.net to get a copy of this message
On Sunday, January 27, 2002, at 10:39 PM, Jason Wong wrote:
On Monday 28 January 2002 04:37, Floyd Baker wrote:
I have 4.1, register globals off, on Windows 98. //pull value from session file: $page_views = $_SESSION['page_views'];
No need for this, in fact this is what is preventing it from working! Once you've used session_register('var'), $var is available for use.
I thought that when register_globals = off, all you need is session_start() at the top of every page and from then on session_register() isn't even needed. I also thought that in fact it was safer to use $_SESSION['variablename'] than to use session_register() each time (well, not safer, but a better habit for the register_globals = off crowd). I'm not disagreeing with you, just asking for clarification. I base this on what I've read in the PHP manual on using session variables (there are some indented blockquotes that suggest this technique for PHP4.1-using register_globals=off-turning PHP coders). Erik

« previous php.general (#82496) next »