Welcome to WebmasterWorld Guest from 23.20.230.24

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

Session Array is empty

     
6:14 pm on Dec 15, 2011 (gmt 0)



I am building a menu based on a session variable. If it's admin, then echo out the admin full menu. If superuser, echo out the super user menu which has less stuff in it.

I have tried this on my machine(XP) and on my laptop (ubuntu linux) and my father's machine(mint linux). When it is run on a windows 7 machine, the session array is blank and the menu is not displayed. How is that possible?
I don't get it!

Can anyone shed some light on this so it can work for EVERYONE?
Thanks!
6:40 pm on Dec 15, 2011 (gmt 0)

WebmasterWorld Senior Member penders is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month



Have you tried different browsers on the Win7 machine?

The session is probably dependent on a cookie being set in the browser, I can only guess that the cookie is being blocked on that machine? As otherwise the client should not affect the server-side session.
6:57 pm on Dec 15, 2011 (gmt 0)



It's been tried on two win7 laptops. I will ask about cookies.
10:53 pm on Dec 15, 2011 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member



>>The session is probably dependent on a cookie being set in the browser.

Ensure that ALL browsers have permissions/abilities to set cookies/sessions - as essentially they are both the same thing.

Also, put some code in to varify that cookies/sessions have been set as expected, or just pop a friendly message on stating that your site requires cookies/sessions turned on in order to function.

Hope that makes sense.

Cheers,
MRb
 

Featured Threads

Hot Threads This Week

Hot Threads This Month