Is it considered good practice to have javascript validate form fields and php to refer to database.

Or is it better to php validate form fields and talk to database:goof:

skunkbad
—
2011-08-25T07:01:49Z —
#2

I like to do simple checks with javascript. A lot can be done to ensure that the site visitor fills out the form correctly, but you should always do true validation on the server. The reason for this is that javascript can be turned off, or data could be posted to your controller bypassing your form altogether!