RE: [PHP] Validation and session variables
| From: | Ford, Mike | Date: | Wed, 27 Oct 2004 11:42:06 +0000 |
| Subject: | RE: [PHP] Validation and session variables | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-200425@lists.php.net to get a copy of this message | ||
To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm
> -----Original Message-----
> From: Stuart Felenstein [mailto:stuart4m@yahoo.com]
> Sent: 27 October 2004 12:18
>
> --- "Ford, Mike" <M.Ford@leedsmet.ac.uk> wrote:
> > header("Location: $url?".SID);
>
> This is all I need to include the SID ?
Yup. If PHP thinks cookies are enabled, SID will actually evaluate to a
blank string; otherwise it will contain the "sessionname=sessionid" pair.
Oh, and it can't hurt to do a session_write_close() just before the
redirect.
Cheers!
Mike
---------------------------------------------------------------------
Mike Ford, Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services, JG125, James
Graham Building, Leeds Metropolitan University, Headingley Campus, LEEDS,
LS6 3QS, United Kingdom
Email: m.ford@leedsmet.ac.uk
Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211