Page 1 of 1

XHTML and PHP

Posted: Wed Feb 09, 2005 3:21 pm
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/

Posted: Wed Feb 09, 2005 3:42 pm
by feyd
turn off trans_sid and perform the sessiond id addition yourself...

Posted: Wed Feb 09, 2005 5:32 pm
by timvw
; The separator used in PHP generated URLs to separate arguments.
; Default is "&".
arg_separator.output = "&"

Posted: Wed Feb 09, 2005 5:53 pm
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. :)

Posted: Wed Feb 09, 2005 6:26 pm
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.

Posted: Mon Feb 14, 2005 10:09 am
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.