PDA

Click to See Complete Forum and Search --> : W3C's HTML Validator


chrisjk
May 2nd, 2002, 03:57 PM
Is it crap...what is wrong with appending variables into URLs, and why isn't id picked up if it has a problem with them?

Below are the results of attempting to parse this document with an SGML parser.

Line 50, column 35:
... td><a href="dealdisplay.php?id=521&PHPSESSID=59891d7f1533616 ...
^Error: unknown entity "PHPSESSID"
--------------------------------------------------------------------------------

Sorry, this document does not validate as HTML 4.01 Transitional.
That's the only error and it's damn annoying because it makes no sense

scoutt
May 2nd, 2002, 10:24 PM
that probably why a lot of sites make PHPSESSID as s

s=PHPSESSID

Rick Bull
May 3rd, 2002, 06:43 AM
Try using &amp;amp; instead of just & that worked for me with XHTML

punkpie_uk
May 3rd, 2002, 06:49 AM
Yeah, &amp; is correct in ASCII standard

chrisjk
May 3rd, 2002, 08:46 AM
I'm not appending the '&PHPSESSID=...' bit though, PHP is doing that automatically for it's session tracking.

:confused: :confused:

scoutt
May 3rd, 2002, 09:19 AM
I think you can turn that off, not sure. I use it as well and it doesn't appnd it to me. let me look into it.

chrisjk
May 3rd, 2002, 09:41 AM
I want it to do it though, otherwise the system breaks if the user turns cookies off.

I'm just wondering why the validator has a problem with

<a href="some.php?var=value&var1=value1">

that's standard HTTP stuff surely, PHP is doing nothing wrong :confused:

scoutt
May 3rd, 2002, 09:46 AM
I had the same problem. maybe it looks for the variable and it if doesn't find it, then it gives a warning. I seen it skip some of mine, like your id, and give errors on other ones. so I don't think it is just PHPSESSID itself.

chrisjk
May 3rd, 2002, 09:52 AM
At least someone else is getting the same thing happen :D

where would it be looking for the variable though? I don't even see why it cares what is between the quotes of the href.

scoutt
May 3rd, 2002, 10:08 AM
actually mine was in a link as well, but I was missing an alt atrrib in the img that had it on it and the error went away. I did nothing else after that.

chrisjk
May 3rd, 2002, 10:39 AM
hmm, it is an image hyperlink, but there is an alt attribute and I don't get any other errors

scoutt
May 3rd, 2002, 12:54 PM
hey chris, I noticed something odd as well with the variables you are having troubles with.

it seems that all the errors are on the second variable in the link. like so

id=3&phpsession=
-------^ error on all the time. never on the first variable. maybe it nlt like one varialbe in the link.

just a thought.

chrisjk
May 4th, 2002, 09:24 PM
hmm, this is getting crazier all the time; I think i'll just put it down to a bug in the validator because what's wrong with multiple vars? :confused:

Thanks for your help

Rick Bull
May 6th, 2002, 05:36 PM
Unless I'm not understanding what you guys are saying, I said at the start of this thread that you have to write &amp; as an entity like &amp;amp; as anything starting with a &amp; is supposed to only be an entity or escape character. Just change the &amp; to &amp;amp; and it should validate.