Jump to content
Larry Ullman's Book Forums
Sign in to follow this  
arthart

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.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...