PHP Post Parameter Passing Validation When the Value is Empty

I'm having an issue when the posting a selection value for server side validation. When the user does not make a selection, therefore it is still selected on "Select...". It still passes the empty() method, although the value is empty.

if(!preg_match($email_exp, $email_from)) {
$error_message .= 'The Email Address you entered does not appear to be valid.<br />';
}
if(!preg_match($string_exp, $first_name)) {
$error_message .= 'The First Name you entered does not appear to be valid.<br />';
}
if(!preg_match($string_exp, $last_name)) {
$error_message .= 'The Last Name you entered does not appear to be valid.<br />';
}
if(!empty($error_message)) {
formError($error_message);
}

You are testing if $_POST['formGender'] is set, but PHP will return TRUE for isset() on an empty string. No selection on your form means that $_POST['formGender'] == "", and that is considered to be "set" in the isset() check.

Instead test if it is empty() which will both verify if the variable is defined like isset() and if it has a non-empty value.

I'm not really sure what you are trying to accomplish with this. But, 3DModels, Graphic Design, etc will not be part of the $_POST array. They are potential values of $_POST['select']. I don't understand what your intent is here.

The source of your problem:

I finally see where your error is. Instead of $error_message, you are using $errorMessage for $_POST['select']:

if(empty($_POST['select']))
{
// Oops...
$errorMessage .= 'The selection you made does not appear to be valid.<br />';
// Should be
$error_message .= 'The selection you made does not appear to be valid.<br />';
}

You should turn on error_reporting and display_errors in PHP.ini for development and testing only. An uninitialized variable used like $errorMessage .= ... would issue a notice, and you'd see the error on screen. Turn this off for production code.