> -----Original Message-----
> From: John Manko [mailto:[EMAIL PROTECTED]
> Sent: 30 June 2003 15:14
> To: [EMAIL PROTECTED]
> Subject: [PHP] Re: IsSet() and $_SESSION
> 
> 
> None of these worked for me.  ok, if you look at the code, the part 
> where "echo $_SESSION['uid'];" is actually works.
> I get a print out of the variable.  if i call session_start() before 
> anything, set variables in $_SESSION, and check it on another 
> page, the 
> session variables do not exist.  in fact, the session isnt 
> even started, 
> cause I get an "Undefined variable _SESSION".  so, it looks like the 
> session is not spamming page requests.  Do I have to call 
> session_start() on every page to read the $_SESSION variables set in 
> another?

Yes.  Every page that needs access to the session variables must call session_start(). 
 That's what it means on http://www.php.net/session-start when it says "creates a 
session or resumes the current one".

In practice, this means every page, as even if you don't access any session variables 
you may still need the session ID in order to pass it along to the next page (even if 
only implicitly via session.use_trans_sid).

Cheers!

Mike

---------------------------------------------------------------------
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730      Fax:  +44 113 283 3211 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to