Try changing this:
else {
echo 'Error<br>
The Following has occured<br>';
foreach ($errors as $msg) { //Prints the errors.
echo " - $msg<br />\n";
}
echo '<p>Please try again</p>';
} //End of if(empty($errors)) IF.
}// End submit
?>
to this:
if(!empty($errors)) {
echo 'Error<br>
The Following has occured<br>';
foreach ($errors as $msg) { //Prints the errors.
echo " - $msg<br />\n";
}
echo '<p>Please try again</p>';
} //End of if(empty($errors)) IF.
}// End submit
?>
EDIT: As a sidenote, I would suggest rewriting this - the code/indentation is so sloppy that it's hard to read and hard to find errors in the structure.
EDIT2: Looks like this script is also vulnerable to SQL injection attacks. Never use user-submitted data in a SQL query before you run it through a function like [man]addslashes/man or, better yet, [man]mysql_real_escape_string/man.