|
Simple:
[php]$blank_fields = array();
if (empty($_GET['field']))
{
$blank_fields[] = 'Field 1';
}
else if (empty($_GET['another_field']))
{
$blank_fields[] = 'The second field';
}
...
if (count($blank_fields) > 0)
{
echo "You did not fill in the following fields:<br />\n";
foreach ($blank_fields as $field)
{
echo " $field<br />\n";
}
}[/php]
That should do it. Basically, it goes through the fields you want checked, and adds them to an array if they're empty. It then echoes a list if there is one.
|