Forum Moderators: coopster

Message Too Old, No Replies

Session management works in 2 of 3 browsers

...how can that be? Oh...the joys of IE

         

mgm_03

2:29 am on Jul 26, 2005 (gmt 0)

10+ Year Member




I've written a session-based back-end requiring user login. It works as expected when I use Firefox (windows) or Safari (mac) but not in IE 6.

There should be no need to explain my code because php is browser independent. What's happening is that when I enter the user/pw on the login page, (assuming correct usr/pw pair) I get re-directed to the main admin page (index.php) ... that part works. However, clicking on a nav link sends me back to the login (as if the $_SESSION['user'] variable was never set).

I've "lowered" my privacy setting in IE Internet Options to the "lowest" setting to accept all cookies.

ergophobe

5:23 pm on Jul 27, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month




I've "lowered" my privacy setting in IE Internet Options to the "lowest" setting to accept all cookies.

That was my first thought. I assume that you've cleared the cache, restarted the browser and all that fun stuff.

You aren't using an image-based submit button are you and then checking for it by name are you? If you have

<input class="submit" type="image" name="login" value="login" src="/imgs/login.png" alt="login" />

When you post this, FF will post

[login_x] => 44
[login_y] => 17
[login] => login

but IE will post only

[login_x] => 41
[login_y] => 19

So if you are checking

if (isset($_POST['login']))

this will always be false in IE.

That's just one possiblity. Try dumping your post vars and see what's different. Checkboxes and a few other things are different in IE in ways similar to what I just described.

print_r($_POST) is your friend

mgm_03

8:03 pm on Jul 27, 2005 (gmt 0)

10+ Year Member



...thanks for trying to help. All of my links are text - no images.

It must be some setting in my browser because everything worked as it should on a different PC using IE.