Validating PHP files (W3)

Suspended
Joined
30 Aug 2004
Posts
9,206
One of the criteria for my assignment is to have validated web pages. Neally all of my pages are php though. Is there a way to validate php files through W3schools? (pages contain php, xhtml, css and a very samll amount of dhtml)
 
geeza said:
One of the criteria for my assignment is to have validated web pages. Neally all of my pages are php though. Is there a way to validate php files through W3schools? (pages contain php, xhtml, css and a very samll amount of dhtml)
You validate the output of your scripts, not the scripts themselves.
 
Mickey said:
You validate the output of your scripts, not the scripts themselves.


are right, thanks. How would I go about doing this? I have pages for things like allowing customers to register, login and view/sort products. Also admin pages for editing and adding products which 'customers' can then view
 
geeza said:
are right, thanks. How would I go about doing this? I have pages for things like allowing customers to register, login and view/sort products. Also admin pages for editing and adding products which 'customers' can then view


if you trying to validate 'admin' pages that are behind some sort of login either session based or htaccess then I think your only option is to remove the login validation then do the validation tests. But on the plus side if your tutor tries to validate the pages themselves they'll have the same problem and I doubt they'd go to the trouble of removing the login/security just to validate it so you'll probably get away with it :)

also the "Sitewide validator" mentioned above does have some issues when validating strick doc types i've noticed, game me a load of pointless errors relating to the user of "/" for closing input tags on forms.
 
Last edited:
thanks all, wasnt expecting this many replies. Its hosted internally on the uni network but I didnt see the direct input box on W3 site.

Problem solved (though Im just going to validate the index page and it has 13 errors) :(
 
Just fix the first error, then revalidate. A lot of the time the subsequent errors are falloff from the first.
 
For those using the Firefox web developer toolbar (and if you're not, why not!?), there's a handy shortcut (ctrl+shift+a) which will send your generated code to the validator.
 
LazyManc said:
For those using the Firefox web developer toolbar (and if you're not, why not!?), there's a handy shortcut (ctrl+shift+a) which will send your generated code to the validator.
Or you could just install the validator extensions ;)
 
quick way if theres errors. paste a picture saying valid xhtml page with a link to the w3 validate page. tutor wouldnt be able to see the code anyway.

ha ha :)
 
Back
Top Bottom