Jump to content
Larry Ullman's Book Forums

Chapter 9 - Accessing Session Variables

Recommended Posts

What debugging steps have you taken so far? What versions of PHP and MySQL are you running?


Things to consider are:


1) Are you logging in from http://domain.com and being redirected to http://www.domain.com? If so it's classed as a new domain and a new session will be started. Could check this also by echo'ing out sessIon_id() on both pages.


2) Try using print_r($_SESSION) to see what data is being stored, if any.


Also in general you should check the index exists using isset() first before trying to access a variable.


Let us know how you get on - and post more detail so we can give better help.

Link to comment
Share on other sites


  • Create New...