Re: Session Problem

From: Date: Tue, 05 Oct 2004 13:54:39 +0000
Subject: Re: Session Problem
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-198663@lists.php.net to get a copy of this message
Kevin Javia wrote:
Hi there, I have got PHP 5 installed on IIS6 with 'register_globals = on'. consider switching it off. your application will be impossible to install on any other server if you keep working on it with register global s on.
When run my page with session variable at top of the page <? $_SESSION['_user'] == "" .......... ?> Is your syntax correct if you want to set a value for this you need to use '=' and not '=='
I got notice like "Notice: Undefined index: _user in E:\Projects\........." this is just a warning, you can disable it or write it to the log file instead of the browser by editing your php.ini
What can be the reason and what is the solution? _user variable is not registered before. The fact that it's not registered and that you are using it in a comparision operation is what's caused the engine to give you a warning.
Thanks a ton for reading this far. Kevin.
-- Raditha Dissanayake. ------------------------------------------------------------------------ http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader Graphical User Inteface. Just 128 KB | with progress bar.

« previous php.general (#198663) next »