No announcement yet.

need help for the PHP script code

  • Filter
  • Time
  • Show
Clear All
new posts

  • need help for the PHP script code

    is the validator at fault?
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "">
    <html xmlns="">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>Validator Test</title>
    <script type="text/javascript">

    var exampleGetString;
    exampleGetString = "?somedata=1";
    exampleGetString += "&failedvalidation=1";


    I wrote a script that grabs quite a bit of data to pass as post data to a PHP script via ajax. When I tried to validate the page, I got all kinds of errors about ampersand entities. Obviously, replacing them with &amp; will make the data request NOT work, so is this a fault with the validator (i.e. the document IS valid) or is there some other way I should be doing this?

    please let me know what changes should i do to remove the bug ..?

  • #2
    center align image with CSS

    IMG.displayed {
    display: block;
    margin-left: auto;
    margin-right: auto }
    <IMG class="displayed" src="" alt="...">

    you can also use p tag with center attibute
    Last edited by staciejortega; 17-02-11, 03:51 AM. Reason: add alternative solution