[Variablen] Problem Variablenübergabe und W3C

Einklappen
X
 
  • Filter
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge

  • [Variablen] Problem Variablenübergabe und W3C

    Hallo!

    Ich habe da folgendes komisches Problem. Ich versuche via php Variablen in einer URL zu übergeben. Das Funktioniert auch, aber der W3C Validator liefert mir da Fehler. Wie kann ich das beheben?

    PHP-Code:
    echo "<a href=\"fotoansicht.php?nav=Fotos_anzeigen&Auto_ID=".urlencode($Auto_OK)."&Marke=".urlencode($Marke[$o])."#Foto$count\"> 
    <img src=\"fotos/
    $Foto\" width=\"160\" height=\"120\" alt=\"$Foto\" /></a> \n"
    Ich krieg nur solche Meldungen vom Validator auf validator.w3.org:

    Warning Line 102 column 44: cannot generate system identifier for general entity "Auto_ID".
    ...="fotoansicht.php?nav=Fotos_anzeigen&Auto_ID=9&Marke=Alfa+GT+1%2C9+JTD+Distin

    An entity reference was found in the document, but there is no reference by that name defined. Often this is caused by misspelling the reference name, unencoded ampersands, or by leaving off the trailing semicolon (. The most common cause of this error is unencoded ampersands in URLs as described by the WDG in "Ampersands in URLs".

    Entity references start with an ampersand (&) and end with a semicolon (. If you want to use a literal ampersand in your document you must encode it as "&amp;" (even inside URLs!). Be careful to end entity references with a semicolon or your entity reference may get interpreted in connection with the following text. Also keep in mind that named entity references are case-sensitive; &Aelig; and &aelig; are different characters.

    If this error appears in some markup generated by PHP's session handling code, this article has explanations and solutions to your problem.

    Note that in most documents, errors related to entity references will trigger up to 5 separate messages from the Validator. Usually these will all disappear when the original problem is fixed.


    Error Line 102 column 44: general entity "Auto_ID" not defined and no default entity.
    ...="fotoansicht.php?nav=Fotos_anzeigen&Auto_ID=9&Marke=Alfa+GT+1%2C9+JTD+Distin

    This is usually a cascading error caused by a an undefined entity reference or use of an unencoded ampersand (&) in an URL or body text. See the previous message for further details.


    Warning Line 102 column 51: reference not terminated by REFC delimiter.
    ...nsicht.php?nav=Fotos_anzeigen&Auto_ID=9&Marke=Alfa+GT+1%2C9+JTD+Distinctive#F

    If you meant to include an entity that starts with "&", then you should terminate it with ";". Another reason for this error message is that you inadvertently created an entity by failing to escape an "&" character just before this text.
    Wie krieg ich das hin?

    mfg,
    ayin

  • #2
    falsch:
    Code:
    ...?foo=1&bar=2
    richtig:
    Code:
    ...?foo=1&amp;amp;bar=2

    Kommentar


    • #3
      Danke dir.

      Kommentar


      • #4
        Hallo,

        hab genau das gleiche Problem. Bei von mir erzeugten URLs funktioniert das wunderbar, nur bei der PHPSESSID nicht. Die wird ja autom. angefügt und zwar mit "&". Daher immer noch zig Fehler. Kann man das umstellen?

        DANKE!

        Kommentar


        • #5
          http://de.php.net/manual/de/ini.core...parator.output
          [FONT="Helvetica"]twitter.com/unset[/FONT]

          Shitstorm Podcast – Wöchentliches Auskotzen

          Kommentar

          Lädt...
          X