Results 1 to 14 of 14

Thread: W3C's HTML Validator

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Jul 1999
    Posts
    5,923

    W3C's HTML Validator

    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

  2. #2
    scoutt
    Guest
    that probably why a lot of sites make PHPSESSID as s

    s=PHPSESSID

  3. #3
    Frenzied Member Rick Bull's Avatar
    Join Date
    Apr 2002
    Location
    England
    Posts
    1,444
    Try using &amp;amp; instead of just & that worked for me with XHTML

  4. #4
    Fanatic Member punkpie_uk's Avatar
    Join Date
    Sep 2001
    Location
    UK
    Posts
    645
    Yeah, &amp; is correct in ASCII standard
    SPREAD THE WORD!!! Are You Lee McCormick? Because I Am



    Lee M McCormick
    [email protected]

    Lee McCormick.com - Live
    Dynamically Webbed.com - In development but live

  5. #5

    Thread Starter
    PowerPoster
    Join Date
    Jul 1999
    Posts
    5,923
    I'm not appending the '&PHPSESSID=...' bit though, PHP is doing that automatically for it's session tracking.


  6. #6
    scoutt
    Guest
    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.

  7. #7

    Thread Starter
    PowerPoster
    Join Date
    Jul 1999
    Posts
    5,923
    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

  8. #8
    scoutt
    Guest
    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.

  9. #9

    Thread Starter
    PowerPoster
    Join Date
    Jul 1999
    Posts
    5,923
    At least someone else is getting the same thing happen

    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.

  10. #10
    scoutt
    Guest
    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.

  11. #11

    Thread Starter
    PowerPoster
    Join Date
    Jul 1999
    Posts
    5,923
    hmm, it is an image hyperlink, but there is an alt attribute and I don't get any other errors

  12. #12
    scoutt
    Guest
    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.

  13. #13

    Thread Starter
    PowerPoster
    Join Date
    Jul 1999
    Posts
    5,923
    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?

    Thanks for your help

  14. #14
    Frenzied Member Rick Bull's Avatar
    Join Date
    Apr 2002
    Location
    England
    Posts
    1,444
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width