Reply to Re: suggestions on improving this function?

Your name:

Reply:


Posted by Hilarion on 08/23/05 19:07

adam <adam@graphicsdesign.org> wrote:
> haven't tested it yet, but it seemed a bit overdone for what it does.
> suggestions on how to simplify it a bit greatly appreciated :]
>
> [snip]

Try this (uncomment line with $requirementMet if you need that):

function checkData( $requiredFields )
{
$error = array_diff_key( $requiredFields, $_POST );
//$requirementMet = array_keys( array_intersect_key( $_POST, $requiredFields ) );
if (count($error))
{
error( $error );
exit;
}
else
submitData();
}


Hilarion

[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

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