if (!isset($_SESSION['client_filter'])) {
$_SESSION['client_filter'] = $client_filter;
}
That way it will be set before the rest of the script commences.
Hope this works for you! If not, I'm not sure what the problem is and someone else will have to help you.
--Joseph Guhlin http://www.josephguhlin.com/
Was I helpful? Let others know: http://svcs.affero.net/rm.php?r=bahwi
Kevin Porter wrote:
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