You are here: Re: Form Validation « PHP Programming Language « IT news, forums, messages
Re: Form Validation

Posted by Toby A Inkster on 04/05/07 22:08

Jerim79 wrote:

> The obvious problem is that when the page first loads, it displays the
> error message.

I tend to add a hidden form field:

<input name=submitted type=hidden value=1>

Then, before outputting the error message, check the value of
$_POST['submitted']. If it's not '1', then don't output the error
message -- just output a plain form.

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact
Geek of ~ HTML/SQL/Perl/PHP/Python*/Apache/Linux

* = I'm getting there!

 

Navigation:

[Reply to this 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

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