form Validation white page not showing errors
- by Jess McKenzie
In the example below I am wanting to do all of the 'safety' checks on the $_POST variables but it seems when I click submit I get a white page why? I am wanting it to show the errors etc
Form Process:
/* check if the form is submitted */
if (isset($_POST['submitButton'])) {
$fullName = $_POST['fullname'];
if($_SERVER['REQUEST_METHOD'] == 'POST' && !empty($fullName))
{
if (!ctype_alpha(str_replace(array("'", "-"), "",$fullName))) {
$errorfullName .= '<span class="errorfullName">*First name should be alpha characters only.</span>';
}
if (strlen($fullName) < 3 OR strlen($fullName) > 40) {
$errorfullName .= '<span class="errorfullName">*First name should be within 3-40 characters long.</span>';
}
}
}