Forum Moderators: coopster

Message Too Old, No Replies

Validating PHP with the WC3 validator

         

rsart

8:34 am on Jun 18, 2004 (gmt 0)

10+ Year Member



We have recently recoded our entire site from HTML and PHP to XHTML/CSS and PHP.

We have been using the WC3 validator to check all the pages, and it works fine on same pages, but not on others. The problem arises with the fact that our sit is a login based site (it has to be, its an online golf score tracker).

If you are not logged in and try to access a page that is based on being a logged in user (you would have to type in a URL, there are lo links when no logged in) you would trigger the die(Unable to connect...) command.

So, when I am logged in and I go to say, view my scores page, and try to validate that, the WC3 validator falls over becuase it is NOT logged in.

Has anyone got any ideas on how to resolve this?

I *could* go the page myself, save the source and C&P it into the validator text input box, but I'm hoping for a more user friendly solution.

tomda

8:51 am on Jun 18, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi, I am afraid it is the only way!

Or may be you could copy your website in a new folder and remove all login components.

DrDoc

3:52 pm on Jun 18, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Or, just view that page in Opera, right-click... Go to "Frames > Validate source" (Ctrl-Alt-V)
Voila! It validates the source (as it was sent to the browser), not the page URL ;)

digitalv

4:00 pm on Jun 18, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You could write some quick user-agent detection and "allow" W3C's user agent in to the login area for the purpose of validation, then kill those lines.

rsart

5:35 pm on Jun 18, 2004 (gmt 0)

10+ Year Member



The opera trick is a work of genius - thank you so much!