Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
September 9, 2004, 7:34 pm
rate this thread
I have a login page and a target page that when the user is logged in is
The structure of the site is:
Actual hosted site (www.suttonrugby.zenwebhosting.com)
When a user goes to the "teamspage.php" on the hosted site, the first part
of the server side code does this:
- Janwillem Borleffs
September 10, 2004, 6:45 am
Re: NEWBIE: session_start() data lost between pages
That's not much, isn't it? ;-)
Anyway, in a default environment, session id's are stored in cookies.
Cookies are domain dependent, which means that a cookie set for domain A
cannot be read from domain B. Subdomains are okay, so a cookie set on domain
B can also be read from subdomain A.B when the session.cookie_domain
directive in the php.ini file is set to ".B".
When you really need to read the session id from domain A on domain B, you
should disable the session.use_cookies directive in the php.ini file. This
way, the id can always be retrieved from the $_GET array, identified by the
name defined by the session.name directive.
BTW, the following page is a must read: http://nl3.php.net/session