Reply to Re: Form validation with PHP/Javascript

Your name:

Reply:


Posted by Rik on 08/16/06 13:39

Petr Vileta wrote:
> "Chris" <designerNOSPAM@centurytel.net> píše v diskusním příspěvku
> news:ebtctd$8ao$1@news01.intel.com...
>> Hi,
>>
>> I have a form for uploading documents and inserting the data into a
>> mysql db. I would like to validate the form. I have tried a couple
>> of Javascript form validation functions, but it appears that the data
>> goes straight to the processing page, rather than the javascript
>> seeing if data is missing and popping up an alert. I thought it may
>> be because much of the form is populated with data from the db (lists,
>> etc.), but when I leave out data in a simple textbox, it still doesn't
>> see it. I've tried a couple of different things, that didn't work, so
>> I simplified and tried to address one form element at the simplest
>> level at a time - still no luck. Is there something special I need to
>> do to make the Javascript work before the PHP? Is there a good way to
>> do client side validation with PHP?
>>
> Javascript validation is not a good idea :-) Some users could have
> disabled scripting in browser.
> Validate data at server side and generate some warning into returned page.

Javascript validitation IS a good idea, as it can save the user a trip
to the server. You HAVE to check server-side too, that's true.

Grtz,
--
Rik Wasmus

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация