Re: Session and MS-IE6

From: Date: Tue, 02 Mar 2004 12:18:54 +0000
Subject: Re: Session and MS-IE6
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-179233@lists.php.net to get a copy of this message
You are correct Richard. Thanks for stating the obvious. The reason I get the "undefined index.." error message is because IT DOES NOT EXIST. How does this resolve my "session" problem? Let me repeat - my code works with MS-IE 5.5 but not MS-IE6. Pance. "Richard Davey" <rich@launchcode.co.uk> wrote in message news:412562469.20040302115728@launchcode.co.uk... > Hello Pance, > > Tuesday, March 2, 2004, 11:45:49 AM, you wrote: > > P> and then I read the PHP manual and it suggested this instead: > P> session_start(); > P> if (!$_SESSION['user_id']){ .... > > P> which worked on my machine (Win98 and MS-IE5.5). But today I tried to login > P> to my page from the client's computer using MS-IE 6 and I got the error: > P> undefined index 'user-id'.... > > P> Does anybody know what's going on? Is there a bug with MS-IE6 when using > P> sessions? > > An undefined index error is PHP code related, not browser related. > It's possible that the IE6 POST bug that is going around could cause > it IF your error is the result of a page which takes form input from a > user to build up that response. > > Your code is checking to see if the user_id element of the session > array is false or not. Try checking to see if the element even exists > or not before checking to see what it equals. > > -- > Best regards, > Richard Davey > http://www.phpcommunity.org/wiki/296.html

« previous php.general (#179233) next »