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" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
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
>
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to