Re: php4 / sessions

From: Date: Fri, 13 Dec 2002 19:01:41 +0000
Subject: Re: php4 / sessions
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-128187@lists.php.net to get a copy of this message
The variable must exist before you can register it in the session.. $client_filter = 'filter'; session_register('client_filter'); ..or simply.. $_SESSION['client_filter'] = 'filter'; -Kevin ----- Original Message ----- From: "Kevin Porter" <Kevin.Porter@becta.org.uk> To: <php-general@lists.php.net> Sent: Friday, December 13, 2002 11:15 AM Subject: [PHP] php4 / sessions > Hi, > > I'm trying to get a session variable to work. Here's the code at the start > of my script: > > session_name('CLIENTFILTER'); > session_start(); > session_register( 'client_filter' ); > > As I understand it, the variable $client_filter should now be available to > me? But I can't see it with either just $client_filter or even > $HTTP_SESSION_VARS['client_filter']. > It's definitely setting a cookie in the browser, but it doesn't seem to be > picking up the variable on subsequent pages. > > I'm on PHP 4.0.6 with register_globals turned on. (Apache on Solaris) > > > Any help greatly appreciated.... > > TIA, > > - Kev > > > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > the system manager. > This footnote also confirms that this email message has been swept by > MIMEsweeper for the presence of computer viruses. > www.mimesweeper.com > ********************************************************************** > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.general (#128187) next »