PDA

View Full Version : Validating PHP



joliettech
01-30-2004, 03:02 PM
Hello,
We are using LiveHelp (PHP Live Chat application) on our site. We validate all our pages with the W3C Validator. Below is the results of the validation. I don't know php well enough to modify the string. Is there a way to modify this so it will validate and still perform the function it needs to?


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

Line 957, column 97: cannot generate system identifier for general entity "department"
.../livehelp/livehelp_js.php?cmd=hidden&department=1" type=""></script>

Line 957, column 97: general entity "department" not defined and no default entity (explain...).
.../livehelp/livehelp_js.php?cmd=hidden&department=1" type=""></script>

Line 957, column 107: reference to entity "department" for which no system identifier could be generated
...livehelp_js.php?cmd=hidden&department=1" type=""></script>

Line 957, column 96: entity was defined here
...m/livehelp/livehelp_js.php?cmd=hidden&department=1" type=""></script>


Any help with this would be appreciated.
Thanks,

paulhiles
02-08-2004, 01:22 PM
Hi John,

Sorry for the delay in responding to your post. I think the W3C Validator is just having its usual panic over the inclusion of operators such as the "ampersand" and "equals" characters in the URL string.
If you can find the code that generates the string in the first place, you may be able to substitute the 'offending' characters for standard HTML characters.
for example, instead of hidden&department use hidden&amp;department

There's probably nothing wrong with your code... its just one of those niggly things about trying to validate to standards. I'm also sure there's probably a global function that you can apply site-wide to prevent this error occurring... (beyond me, I'm afraid!) you might want to ask one of the PHP experts around here! :o)

Paul

joliettech
02-09-2004, 09:15 AM
Thanks Paul,

I will give this a try this week. I appreciate you taking the time to look at the problem and offer a solution. I'll let you know how it works out.

Thanks again,

joliettech
02-09-2004, 09:51 AM
Hey Paul,

I tried your suggestion and it works fine. Thanks again for your help.