Reply to Re: Form Validation

Your name:

Reply:


Posted by Jerim79 on 04/06/07 19:11

On Apr 5, 5:02 pm, Tyno Gendo <u...@example.com> wrote:
> Jerry Stuckle wrote:
>
> [snip]
>
> >> So it does some data validation at the top. If $Email is empty, it
> >> shows the form on the screen for the user to fill out. It also puts
> >> the appropriate error message next to the email question. If $Email is
> >> not empty when the user clicks submit, the form verifies it is not
> >> empty, and then calls the next page. The obvious problem is that when
> >> the page first loads, it displays the error message.
>
> > Before validating see if $_POST['Submit'] contains 'Continue' or not. If
> > not, don't validate.
>
> Or you can wrap your checks with the following also, so it only does it
> on POST
>
> if ( $_SERVER["REQUEST_METHOD"] == "POST" ) {
> // validation checks
>
> }

I like both of the ideas presented. Thanks so much. The answer is
always obvious after someone points it out :)

[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

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