Scholarship Form

First Name:

Last Name:

  

\n"; } function validateInput($data, $fieldName) { global $errorCount; if (empty($data)) { displayRequired($fieldName); ++$errorCount; $retval = ""; } else //Only clean up the input if it isn't empty { $retval = trim($data); $retval = stripslashes($retval); } return($retval); } $errorCount = 0; $firstName = validateInput($_POST['fName'], "First name"); $lastName = validateInput($_POST['lName'], "Last name"); echo $errorCount; if ($errorCount > 0) { echo "Please re-enter the information below.
\n"; redisplayForm($firstName, $lastName); } else { echo "Thank you for filling out the scholarship form, " . $firstName . " " . $lastName . " ."; } ?>