Re: Poll of sorts: Javascript Form validation or PHP

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

 



On 5 Dec 2008, at 18:28, Terion Miller wrote:
I have a huge form to validate and wonder which is better javascript
validation or php, the page is a php page, I actually put js validation on it but then it stopped working (stopped inserting into the db) not sure if
that had anything to do with it....
What does everyone prefer?

Both. Always PHP, optionally with JS to cut down on pointless HTTP requests.

Never ever trust anything coming from the client, even if you have JS checking it first. The client may not have JS support either due to the user turning it off or just because it doesn't. Your control over the data starts when your server-side script is executed, not before.

-Stut

--
http://stut.net/

--
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