The field $fieldName is requied.

\n"; ++$errorCount; $retval = ""; } else //Only clean up the input if it isn't empty { $data = trim($data); $data = stripslashes($data); if (is_numeric($data)) { $data = round($data); if (($data >= 1900 && $data <= 2100)) { $retval = $data; } else { echo "

The field $fieldName must be between 1900 and 2100.

\n"; ++$errorCount; $retval = ""; } } else { echo "

The field $fieldName must be a NUMBER between 1900 and 2100.

\n"; ++$errorCount; $retval = ""; } } return ($retval); } echo validateYear(2100, "Birthday"); ?>