Error handling for submit.php