W3c Validation for php files?

Discussion in 'HTML' started by Simon Meech, Dec 4, 2003.

  1. Simon Meech

    Simon Meech Guest

    How do you validate a PHP file's HTML output if the output is based on data
    parsed through POST? Sorry if I'm being thick :)

    --
    -------------------
    Simon Meech
    Hardwire Design
    http://www.hardwiredesign.com
     
    Simon Meech, Dec 4, 2003
    #1
    1. Advertising

  2. Simon Meech

    Dylan Parry Guest

    Simon Meech wrote:

    > How do you validate a PHP file's HTML output if the output is based on data
    > parsed through POST? Sorry if I'm being thick :)


    Use Opera. Visit the page in question, submit the form, and then
    "right-click > frame > validate source". HTH

    --
    Dylan Parry
    http://www.webpageworkshop.co.uk - FREE Web tutorials and references
     
    Dylan Parry, Dec 4, 2003
    #2
    1. Advertising

  3. Simon Meech

    brucie Guest

    in post <news:bqnklu$7iv$>
    Simon Meech said:

    > How do you validate a PHP file's HTML output if the output is based on data
    > parsed through POST?


    when the POST comes in your script checks it for suitability (along with
    all the other checks) before generating the HTML. if its not suitable do
    whatever needs to be done with it (or reject it outright) so the
    resulting HTML file is yummy.

    --
    brucie
    05/December/2003 01:46:45 am kilo
     
    brucie, Dec 4, 2003
    #3
  4. Simon Meech

    m Guest

    On Thu, 04 Dec 2003 15:47:26 +0000, Dylan Parry wrote:

    > Simon Meech wrote:
    >
    >> How do you validate a PHP file's HTML output if the output is based on data
    >> parsed through POST? Sorry if I'm being thick :)

    >
    > Use Opera. Visit the page in question, submit the form, and then
    > "right-click > frame > validate source". HTH


    ....o-or, download the 'checky' extension for Mozilla or Firebird,
    and call validation on the page from it.
     
    m, Dec 4, 2003
    #4
  5. Simon Meech

    Nick Howes Guest

    "Dylan Parry" <> wrote in message
    news:p...
    > Simon Meech wrote:
    >
    > > How do you validate a PHP file's HTML output if the output is based on

    data
    > > parsed through POST? Sorry if I'm being thick :)

    >
    > Use Opera. Visit the page in question, submit the form, and then
    > "right-click > frame > validate source". HTH
    >


    or in any other browser it's probably a case of getting to that page
    normally, then saving the html to your computer and validating that copy.
     
    Nick Howes, Dec 4, 2003
    #5
  6. Simon Meech

    altamir Guest

    "Simon Meech" <> wrote in
    news:bqnklu$7iv$:

    > How do you validate a PHP file's HTML output if the output is based on
    > data parsed through POST? Sorry if I'm being thick :)


    save html output as a local file and then upload it and validate.

    --
    altamir
     
    altamir, Dec 4, 2003
    #6
  7. Simon Meech

    Simon Meech Guest


    > save html output as a local file and then upload it and validate.


    Cheers for your help everyone, quite simple hehe :)
     
    Simon Meech, Dec 4, 2003
    #7
  8. Simon Meech:

    >>save html output as a local file and then upload it and validate.


    > Cheers for your help everyone, quite simple hehe :)


    Not entirely that simple. You have to watch out that the browser doesn't
    modify the HTML when it saves it, perhaps even making it invalid (or
    possibly making it valid although it wasn't). Such modification happens
    in some browsers (e.g. MSIE) in some circumstances.

    --
    Bertilo Wennergren <> <http://www.bertilow.com>
     
    Bertilo Wennergren, Dec 4, 2003
    #8
  9. Simon Meech

    Louis Somers Guest

    "Simon Meech" <> wrote in news:bqoc1s$ekm$1
    @sparta.btinternet.com:

    >
    >> save html output as a local file and then upload it and validate.

    >
    > Cheers for your help everyone, quite simple hehe :)
    >


    Don't forget to convert the data to HTML standards. Like if mr. Daniël
    fills in his name, it should be converted to Dani&euml;l. See
    http://www.asciitable.com/ (the HTML tab) for a full list of codes.

    --
    News Updater, No scripts, No Database
    http://www.xmlssoftware.com/NUpdater
     
    Louis Somers, Dec 5, 2003
    #9
  10. Simon Meech

    Dylan Parry Guest

    Louis Somers wrote:

    > Don't forget to convert the data to HTML standards. Like if mr. Daniël
    > fills in his name, it should be converted to Dani&euml;l. See
    > http://www.asciitable.com/ (the HTML tab) for a full list of codes.


    Why?

    --
    Dylan Parry
    http://www.webpageworkshop.co.uk - FREE Web tutorials and references
     
    Dylan Parry, Dec 5, 2003
    #10
  11. Simon Meech

    Zak McGregor Guest

    On Fri, 05 Dec 2003 03:18:22 +0200, Louis Somers <"Louis Somers"
    <>> wrote:

    > Don't forget to convert the data to HTML standards. Like if mr. Daniël
    > fills in his name, it should be converted to Dani&euml;l. See
    > http://www.asciitable.com/ (the HTML tab) for a full list of codes.


    Not prior to storing it though - your database or whatever storage method
    will need the data to be locale-ised for it's own requirements. But prior
    to output to browsers, definitely convert all "html special characters".

    Ciao

    Zak
    --
    ========================================================================
    http://www.carfolio.com/ Searchable database of 10 000+ car specs
    Auctioning motoring-related items at eBay? http://www.carfolio.com/ebay/
    ========================================================================
     
    Zak McGregor, Dec 5, 2003
    #11
  12. Simon Meech

    Zak McGregor Guest

    On Fri, 05 Dec 2003 03:30:13 +0200, Dylan Parry <"Dylan Parry"
    <>> wrote:

    > Louis Somers wrote:
    >
    >> Don't forget to convert the data to HTML standards. Like if mr. Daniël
    >> fills in his name, it should be converted to Dani&euml;l. See
    >> http://www.asciitable.com/ (the HTML tab) for a full list of codes.

    >
    > Why?



    Um so the resulting product validates?

    Ciao

    Zak

    --
    ========================================================================
    http://www.carfolio.com/ Searchable database of 10 000+ car specs
    Auctioning motoring-related items at eBay? http://www.carfolio.com/ebay/
    ========================================================================
     
    Zak McGregor, Dec 5, 2003
    #12
  13. Zak McGregor wrote:

    >>> Don't forget to convert the data to HTML standards. Like if mr. Daniël
    >>> fills in his name, it should be converted to Dani&euml;l. See
    >>> http://www.asciitable.com/ (the HTML tab) for a full list of codes.

    >>
    >> Why?

    >
    >Um so the resulting product validates?


    It'll validate perfectly even with a 'ë' as long as the validator can
    find an appropriate encoding.

    Micha
     
    Michael Fesser, Dec 5, 2003
    #13
  14. Simon Meech

    Dylan Parry Guest

    Zak McGregor wrote:

    > Um so the resulting product validates?


    It will validate just fine without converting any of these characters. As
    long as the server sends the correct encoding along with the MIME type
    then there will be no problem including a whole host of different
    characters on your page. Umlauts are part of ISO-8859-1, the character set
    for Western European languages, so changing these to character references
    is entirely unnecessary.

    --
    Dylan Parry
    http://www.webpageworkshop.co.uk - FREE Web tutorials and references
     
    Dylan Parry, Dec 5, 2003
    #14
  15. Simon Meech

    Louis Somers Guest

    Dylan Parry <> wrote in
    news:p:

    > Zak McGregor wrote:
    >
    >> Um so the resulting product validates?

    >
    > It will validate just fine without converting any of these characters.
    > As long as the server sends the correct encoding along with the MIME
    > type then there will be no problem including a whole host of different
    > characters on your page. Umlauts are part of ISO-8859-1, the character
    > set for Western European languages, so changing these to character
    > references is entirely unnecessary.
    >


    Well if you are running a forum for example, and some user trys entering
    html, you don't want it to mess up your forum pages do you? Rather change
    <b> into &lt;b&gt; or users might become mis-users. Also member's wanting
    to show HTML code-examples will get frustrated. Trolls can take great
    advantage if you don't convert to HTML.

    --
    News Updater, No scripts, No Database
    http://www.xmlssoftware.com/NUpdater
     
    Louis Somers, Dec 6, 2003
    #15
  16. On Sat, 06 Dec 2003 10:10:19 +0000, Louis Somers wrote:

    > Well if you are running a forum for example, and some user trys entering
    > html, you don't want it to mess up your forum pages do you? Rather change
    > <b> into &lt;b&gt; or users might become mis-users. Also member's wanting
    > to show HTML code-examples will get frustrated. Trolls can take great
    > advantage if you don't convert to HTML.


    That was not what was being discussed. Converting Æ[0] into &AElig; (and
    so on) is mostly unnecessary if you're using the correct character
    encoding; converting < into &lt; is not an internationalisation issue but
    a code-insertion issue.

    [0] By the way, if that comes out mangled, my apologies; I don't normally
    post characters outside the ASCII range but I've read the Fine Manual and
    I *think* it's doing the right thing.
     
    Owen Jacobson, Dec 6, 2003
    #16
  17. Simon Meech

    Mark Parnell Guest

    Sometime around Sat, 06 Dec 2003 10:39:15 GMT, Owen Jacobson is reported to
    have stated:
    > Æ[0]
    >
    > [0] By the way, if that comes out mangled, my apologies; I don't normally
    > post characters outside the ASCII range but I've read the Fine Manual and
    > I *think* it's doing the right thing.


    Looks right here. :)

    --
    Mark Parnell
    http://www.clarkecomputers.com.au
     
    Mark Parnell, Dec 8, 2003
    #17
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Fredrik Elestedt

    W3C validation

    Fredrik Elestedt, Nov 25, 2004, in forum: ASP .Net
    Replies:
    15
    Views:
    1,197
  2. Frank
    Replies:
    9
    Views:
    1,647
    David Dorward
    May 3, 2004
  3. Rajive Narain
    Replies:
    0
    Views:
    2,097
    Rajive Narain
    Sep 18, 2009
  4. Ignoramus6539
    Replies:
    2
    Views:
    277
    Colin McKinnon
    Aug 30, 2006
  5. M. Strobel
    Replies:
    1
    Views:
    244
    The Natural Philosopher
    Mar 5, 2013
Loading...

Share This Page