Guys i need your help again, i need an error-trapping code for registration,There's a course in the input field...and that's for studentsonly..then the faculty must choose the "na", if the user didn't choose "na", it must have an error message that will output..please help again..i understand the logic of my program but the code of database accepting only NA on faculty, i cant get it, i searched it on google, but still i can't find the solution... ..this is the code that i made ..no syntax error but it's still accepting any courses..

//This is the code for error-trapping but its not workingif (empty($errors)){switch($typecheck) {case "faculty" :if ($_POST['course'] != "na") {$errors .= "<font color=red><br />&nbsp;&nbsp;*Course is for students only.</font>";}}