";
print "Form Results
";
print "By Caleb S";
print "
";
if ($valid) {
if ($gender == 'M') {
$gender = 'male';
} elseif ($gender == 'F') {
$gender = 'female';
}
print "Thank you! $name.
";
print "You are " . "$age" . " of age and gender is " . "$gender" . "!
";
print "
For the following comments:
";
print "We will reply to you at $email.
";
} else {
print "Invalid request was made, or not all inputs were filled or something went wrong:
";
if (empty($_POST['name'])) {
print "
Name is Missing";
}
if (empty($_POST['email'])) {
print "
Email is Missing";
}
if (empty($_POST['age'])) {
print "
Age is Missing";
}
if (empty($_POST['gender'])) {
print "
Gender is Missing";
}
if (empty($_POST['comments'])) {
print "
Comments are Missing";
}
}
?>