Re: session variables

From: Date: Tue, 17 Dec 2002 13:25:09 +0000
Subject: Re: session variables
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-128550@lists.php.net to get a copy of this message
1. the opposite of session_register('varname') is session_unregister('varname') NOT unset($varname) 2. Are you on PHP >= 4.1 ?? If so, move away from things like: <? session_start(); $variable = 'foo'; session_register('variable'); session_unregister('variable') ?> and into: <? session_start(); $_SESSION['variable'] = 'foo'; $_SESSION['variable'] = 'bah'; unset($_SESSION['variable']); ?> MUCH cleaner to work with :) Justin on 17/12/02 10:35 PM, Antti (antti@victoria.fi) wrote: > How can I change the values of session variables > (session_register('variable');) in a session. Do I just > unset($variable); and do session_register() again and give it a new > value. I tried this and it seems that it doesn't work. > > Antti > Justin French -------------------- http://Indent.com.au Web Development & Graphic Design --------------------

« previous php.general (#128550) next »