XHTML and PHP

It doesn't matter if you do all the error checking in the world, or if you have the most beautiful graphics, if your site or application design isn't usable, it's not going to do well. Get input and advice on usability and user interface issues here.

Moderator: General Moderators

Post Reply
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

XHTML and PHP

Post by onion2k »

The W3C html validator is complaining about my website not being XHTML strict due to the "&" characters in urls not being "&". Fair enough. However, the "&"s in question are being inserted by PHP as index.php?v=1&PHPSESSID=jkdnjdnnasdjnasdjnadjknjndjk.. How do I make PHP put in valid xhtml without resorting to output buffering?

The offending W3C validation: http://validator.w3.org/check?verbose=1 ... .ooer.com/
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

turn off trans_sid and perform the sessiond id addition yourself...
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

; The separator used in PHP generated URLs to separate arguments.
; Default is "&".
arg_separator.output = "&"
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

I was searching for that when looking for a solution to the issue.. I know I've seen it before, but just didn't see it anywhere.. oh well. :)
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Post by onion2k »

Cool. Cheers. I've actually fixed it by switching the session stuff off as the site isn't actually using sessions anywhere. Curse of the standard include library..

XHTML 1.0 compliant now. Woo! Plus WAI-AA, Bobby AAA, and Section 508 approved.. Not too shabby if I say so myself.
User avatar
wwwapu
Forum Contributor
Posts: 197
Joined: Wed Apr 07, 2004 11:57 am
Location: Turku, Finland

Post by wwwapu »

Imagine two elderly 19th century English aristocrats with mustache and monocles sitting on veranda of some mansion. Having tea, naturally.
The Aristocrat 1 (ar1) asks the other (ar2):
ar1: "How are the coalmines today? If I may ask."
ar2: "Well, they could be better. I hear they hit a very rich goldvein early this morning. It makes it harder to mine decent coal down there, now doesn't it"
ar1 (nods just visibly): "I suppose it does"

That slight approving nod I'm giving to you right now.
Post Reply