Here's the situation, I use session variables to remember which stylesheet a user has selected, and if no session already exists, the server adds "?PHPSESSID=(id)" to the ends of all my links. The problem occurs when the link already has a variable in it, and becomes something like this:
page.php?p=home&PHPSESSID=(id)
The "&" character is illegal in XHTML1.1, and this causes my pages not to validate. Does anybody know a way to change what the server inserts on the links?
Sessions and W3C standards compliance
Moderator: General Moderators
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
There is a setting in the php.ini which governs what URL variable separators are. From a bit of digging on the site, this appears to be arg_separator:
http://php.net/manual/en/configuration. ... tor.output
There's a bit about it on this page (scroll down to the bit about 'Passing the Session ID'):
http://php.net/session
HTH,
Mac
http://php.net/manual/en/configuration. ... tor.output
There's a bit about it on this page (scroll down to the bit about 'Passing the Session ID'):
http://php.net/session
HTH,
Mac
-
niceguyeddie
- Forum Newbie
- Posts: 13
- Joined: Fri Nov 28, 2003 7:12 am
- Location: Westminster, MD
I had the same problem and there are a couple of ways to go about it. The easiest is to do a htaccess, rather than hack your script, IMO.
Here's a useful tutorial that I have found:
http://martin.f2o.org/php/session
Here's a useful tutorial that I have found:
http://martin.f2o.org/php/session