RE: [PHP] Validation and session variables

From: Date: Wed, 27 Oct 2004 11:17:41 +0000
Subject: RE: [PHP] Validation and session variables
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-200421@lists.php.net to get a copy of this message
See inline: --- "Ford, Mike" <M.Ford@leedsmet.ac.uk> wrote: > The only circumstance under which I can think this > might happen is if the > session id is not being propagated by cookie -- > either because they're > blocked in the browser, or because you have them > switched off in php.ini. They are not switched off in php.ini. I do have them "semi blocked" in the browser, i.e. set to "allow for session" > Even if you have session.use_trans_sid enabled, It is enabled. > PHP cannot rewrite URLs in the header() call, so you > have to include the session ID manually. > You should do this regardless of whether you expect > cookies to be enabled, so that it will work ok even > > in the unexpected situation of having cookies > turned off. > > Fortunately, the standard PHP constant SID is > provided for exactly this > purpose, so your header call above should be: > > header("Location: $url?".SID); This is all I need to include the SID ? Thank you Stuart

« previous php.general (#200421) next »