|
Posted by Rik on 08/16/06 21:07
Chris wrote:
> they all refer to the use
> of both
> PHP and js being used together to validate forms.I was looking for
> advice
> for what approach has proven to work best when much of the data in the
> initial form is php-generated (such as populating the list boxes).
To sum it up: you can check not at all, with PHP, with JS, or both, but the
checking with PHP has nothing to do with the checking by JS and vice versa.
Checking with JS is just to prevent an unnecessary trip to the server for
the user, saving him a lot of time. It is inherently unreliable, and should
be double checked by PHP on the server side. These checks have nothing to do
with each other, jus make sure you output valid js & HTML, and check
thoroughly with PHP.
Js is just some icing on the cake here, not a solution to any kind of
problem.
Grtz,
--
Rik Wasmus
[Back to original message]
|