[FX.php List] Eliminat the "?" with the SID option
Jonathan Schwartz
jschwartz at exit445.com
Tue Nov 13 12:35:24 MST 2007
Hi Folks,
After a year of ignoring this nagging issue, I've decided to fix it.
I use the "SID" variable to ensure that my pages work when a user's
cookies are turned off. To do so, I ue the following code whenever I
need to jump to another page:
$url= "thenextpage.php?'.SID;
header('Location:'.$url);
This works great when cookies are turned off. PHP automatically
inserts the SESSID in the url.
However, when cookies are turned on and the SESSID is not needed, I
end up with a question mark at thr end of all my urls. There are no
problems other than the fact that it shouldn't be there.
To eliminate the trailing questions mark, do I need to test for
cookies and then change my two line scri pt above? If so, is there a
best way to test for cookies. Right now, I just start a session, set
a variable, jump to a second page, and if the variable doesn't
follow, then there are no cookies.
Thanks
Jonathan
--
Jonathan Schwartz
Exit 445 Group
jonathan at exit445.com
http://www.exit445.com
415-381-1852
More information about the FX.php_List
mailing list