By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,951 Members | 1,126 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,951 IT Pros & Developers. It's quick & easy.

4.3.10 inserting code invalid HTML

P: n/a

I am in the process of running my site through WC3 validation. I
assume the validator at www.w3c.org cant accept cookies and so PHP is
attaching &PHPSESSID=lasklijasj09jsad (or similar) to my URLS. The
problem is the leading character is a literal & rather than a & and
this is stopping the validator telling me my pages are valid.

What do I do here --

Jul 17 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
*** James escribió/wrote (21 Mar 2005 11:07:38 -0800):
I am in the process of running my site through WC3 validation. I
assume the validator at www.w3c.org cant accept cookies and so PHP is
attaching &PHPSESSID=lasklijasj09jsad (or similar) to my URLS. The
problem is the leading character is a literal & rather than a & and
this is stopping the validator telling me my pages are valid.


You said it all: you cannot insert a literal &. It's the same as inserting
a literal \ in a PHP string: you must escape it. Use & instead.
BTW, W3c Validator won't use cookies. Why and how?
--
-+ Álvaro G. Vicario - Burgos, Spain
+- http://www.demogracia.com (la web de humor barnizada para la intemperie)
++ No envíes tu dudas a mi correo, publícalas en el grupo
-+ Do not send me your questions, post them to the group
--
Jul 17 '05 #2

P: n/a
>*** James escribió/wrote (21 Mar 2005 11:07:38 -0800):
I am in the process of running my site through WC3 validation. I
assume the validator at www.w3c.org cant accept cookies and so PHP is
attaching &PHPSESSID=lasklijasj09jsad (or similar) to my URLS. The
problem is the leading character is a literal & rather than a & and
this is stopping the validator telling me my pages are valid.
You said it all: you cannot insert a literal &.


PHP is inserting a literal &.
It's the same as inserting
a literal \ in a PHP string: you must escape it.
How? It appears that the & is being added through the action of trans_sid.
Use & instead.


How?

Gordon L. Burditt
Jul 17 '05 #3

P: n/a
*** Gordon Burditt escribió/wrote (21 Mar 2005 21:16:16 GMT):
Use & instead.


How?


Sorry, I misunderstood you. Check this:

http://es2.php.net/manual/en/ini.cor...parator.output

--
-+ Álvaro G. Vicario - Burgos, Spain
+- http://www.demogracia.com (la web de humor barnizada para la intemperie)
++ No envíes tu dudas a mi correo, publícalas en el grupo
-+ Do not send me your questions, post them to the group
--
Jul 17 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.