Reply to Form Validation

Your name:

Reply:


Posted by peebrain on 06/25/05 01:51

I understand how to validate form data when a form is submitted to
'self' (ie. action="$_SERVER_[PHP_SELF]"). In this case you simply
validate before processing. However, what if submitting the form to
another page (ie. action="someotherpage.php"). You could validate the
form data on the new page but it makes more sense to validate first
before submitting, plus if there are errors, then you have to send the
user back to the first page. There must be a way to do the error
checking before the submit. The only way I can think to do this is with
Javascript and a button element onclick event (instead of Submit button)
with the Javascript handling the form validation and form submit. There
is probably a real obvious PHP solution but I can't see it.

[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

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