Added error checking to teacher_add_task.do.php