Unterschied index.php?site=seite&page=1 und index.php?site=seite;page=1

Zack

cookies vader
Hallo,
ich möchte eine Seite valid nach folgendem Doctype coden:
HTML:
<!DOCTYPE html
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

Dabei verwende ich $_GET Variablen.

Beim überprüfen mit http://validator.w3.org kommt folgende Fehlermeldung:

Line 130, Column 42: cannot generate system identifier for general entity "page".
…: <a href="index.php?site=gaestebuch&page=1">1</a> | <a href="index.php?site=

?

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.

So weit so gut. Also ändere ich index.php?site=gaestebuch&page=1 in index.php?site=gaestebuch;page=1

Jetzt tauch aber folgendes Problem auf: die Seite bleibt leet.

Beim zwitch des Content wird einfach in den else Teil gegangen:
PHP:
....
			if($_GET['site']=='gaestebuch')
			{
				include "guestbook.php";
			}else{
....

Wie kann ich das vermeiden/ändern so das es wie mit & gehandhabt wird? Oder was muss ich beachten wenn ich mit ; statt & arbeite?
 
Soweit ich weiß das lese, sollst du nicht ; verwenden sondern einfach nur deine & durch &amp; ersetzen und so deine Links aufbauen.
 
Hast du dir die Fehlermeldung überhaupt durchgelesen? Dort steht doch, dass &amp; statt nur & verwendet werden muss.
 
Zurück