By the way, I suggest that you check the incoming variables, not the variables that the incoming variables' values have been assigned to.
if (isset($_POST['submit']))
{
// set variables
if (isset($_POST['fund_number']))
{
$fund_number = $_POST['fund_number'];
}
else
{
// serious error?
}
// declare an empty error array
$error_message = array();
// Form Error Checking
if (empty($_POST['res']))
{
$error_message['res'] = 'Please Enter Suggested Resolution';
}
else
{
$res = trim($_POST['res']);
}
if (empty($_POST['name']))
{
$error_message['name'] ='Please Enter Your Name';
}
else
{
$name = trim($_POST['name']);
}
// ...
}