Re: Validating Form input

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2008-05-14 at 21:48 -0500, Chris W wrote:
> I was wondering what others think of my approach to form validation.  I 
> know many use Java script to do various validation.  However, since 
> there is no way to be sure the data sent to the server is actually 
> valid, you have to check it in your php code on the server anyway.  
> Granted you don't have to, but if you don't, you are just asking for 
> someone to hack your system, or at the very least screw up your data.  
> So my question is since you have to do a validity check on the server, 
> why bother with the Java script?  The only advantage I can see to doing 
> it with Java script is it will cut down on the errors in data that get 
> to the server and then in turn reduce the number for resubmits and keep 
> traffic down a little.  However since none of the projects I have worked 
> on are very high traffic sites, that hasn't been much of a concern.
> 
> Any thoughts?

I ignore JavaScript validation unless I think the round trip is an
issue. Since I'm not working on any million hit per day systems, it's
not an issue. When it becomes an issue... it's simple enough to add the
JavaScript.

Cheers,
Rob.
-- 
http://www.interjinn.com
Application and Templating Framework for PHP


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux