Reply to Re: [PHP] $_POST

Your name:

Reply:


Posted by Andrew Maxwell on 01/17/05 11:07

Thats exactly what i need. Thanks a ton.

~Andrew

On Mon, 17 Jan 2005 10:58:07 +0200, Ville Mattila <ville@pmd.fi> wrote:
> Andrew Maxwell wrote:
> > When you submit something, and you want to make sure that the user
> > inputs all of the info, is there an easier way to do it than this:
>
> One method I've done that is to create an array with the required field
> names, then loop it through and check whether they all have a value.
>
> $required = array('name','pass','blah');
> foreach ($required as $req) {
> if (!$_POST[$req]) {
> die("$reg is missing");
> }
> }
>
> - Ville
>
>
>

[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

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