View Single Post
Old Jun 21st, 2005, 4:07 PM   #2
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9 Ooble is on a distinguished road
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 "&nbsp;&nbsp;&nbsp;&nbsp;$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.
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote