Jun 22nd, 2005, 12:08 PM
|
#3
|
|
Hobbyist Programmer
Join Date: Jul 2004
Location: Location
Posts: 140
Rep Power: 5 
|
Now I get this:
Quote:
$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:
\n"; foreach ($blank_fields as $field) { echo " $field
\n"; } }
|
|
|
|