varois83 wrote:
> Do you guys validate your forms first on the client with javascript and
> then on the server with PHP or just use one of the two and if yes which
> one?
I do both. I did only serverside when I started out (mostly because my
knowledge of JavaScript was limited, at best), but soon moved to doing
both consistently. I always keep the thought "never trust the user" in
the back of my head when I develop, so in my humble opinion, validating
with JavaScript is only for convenience in that it saves time (for the
user) and bandwidth (for the site), while validating with PHP is
required to make sure the data received is indeed valid. Allowing people
to have invalid data stored just by disabling JavaScript on their client
is too much of a risk.
Roy W. Andersen
--
ra at broadpark dot no /
http://roy.netgoth.org/
"Hey! What kind of party is this? There's no booze
and only one hooker!" - Bender, Futurama