Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Validation assistance how to avoid php? 1

Status
Not open for further replies.

DrySnot

Technical User
Nov 29, 2007
46
0
0
I am trying to validate the admin page on my website and its giving me some trouble.

The page is used to approve or deny items that have been submitted to my search database.

When there are no items pending. The page is valid. But if there are any items pending the page is not valid.

Its also password protected. So I just posted the output from w3c

Do you guys have any idea why this is happening?


Validation Output: 5 Errors

1. Warning Line 31, Column 359: cannot generate system identifier for general entity "id" .

…e Catuion<a href='new.php?approve=go&id=245'>Approve!</a> --<a href='new.php?

?

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.
2. Error Line 31, Column 359: general entity "id" not defined and no default entity .

…e Catuion<a href='new.php?approve=go&id=245'>Approve!</a> --<a href='new.php?

?

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.
3. Warning Line 31, Column 361: reference not terminated by REFC delimiter .

…Catuion<a href='new.php?approve=go&id=245'>Approve!</a> --<a href='new.php?de

?

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.
4. Warning Line 31, Column 361: reference to external entity in attribute value .

…Catuion<a href='new.php?approve=go&id=245'>Approve!</a> --<a href='new.php?de

?

This is generally the sign of an ampersand that was not properly escaped for inclusion in an attribute, in a href for example. You will need to escape all instances of '&' into '&amp;'.
5. Error Line 31, Column 361: reference to entity "id" for which no system identifier could be generated .

…Catuion<a href='new.php?approve=go&id=245'>Approve!</a> --<a href='new.php?de

?

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.
6. Info Line 31, Column 358: entity was defined here .

…me Catuion<a href='new.php?approve=go&id=245'>Approve!</a> --<a href='new.php

7. Warning Line 31, Column 411: reference not terminated by REFC delimiter .

…!</a> --<a href='new.php?delete=go&id=245'>Deny!</a> <br /><br /><br />

?

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.
8. Warning Line 31, Column 411: reference to external entity in attribute value .

…!</a> --<a href='new.php?delete=go&id=245'>Deny!</a> <br /><br /><br />

?

This is generally the sign of an ampersand that was not properly escaped for inclusion in an attribute, in a href for example. You will need to escape all instances of '&' into '&amp;'.
9. Error Line 31, Column 411: reference to entity "id" for which no system identifier could be generated .

…!</a> --<a href='new.php?delete=go&id=245'>Deny!</a> <br /><br /><br />

?

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.
10. Info Line 31, Column 358: entity was defined here .

…me Catuion<a href='new.php?approve=go&id=245'>Approve!</a> --<a href='new.php

11. Error Line 31, Column > 80: XML Parsing Error: EntityRef: expecting ';' .

…/b>genus: Batesiella<br />species: <a href='
?
12. Error Line 31, Column > 80: XML Parsing Error: EntityRef: expecting ';' .

…/b>genus: Batesiella<br />species: <a href='

 
Just encode the & symbols as &amp;

The & character has special meaning. It says "what comes next is a character entity". Since you have &id the browser/validator is expecting a character entity but there is none called &id.

--
Tek-Tips Forums is Member Supported. Click Here to donate

<honk>*:O)</honk>

Tyres: Mine's a pint of the black stuff.
Mike: You can't drink a pint of Bovril.


 
Drysnot, the HTML Validator gave you the reason and a link here:
There you can see the same solution Foamcow gave you and the explaination why to do so and where not to do so.

If that URL is generated by PHP, also take a look at the other link given by the validator:

It was all at your hands already.

Bye, Olaf.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top