protected function do_post() { if (empty($_POST["student_id"])) { $this->exit_error(400, "studentIDMandatoryAndNotEmpty"); } else { if (empty($_POST["team_id"])) { $this->exit_error(400, "teamIDMandatoryAndNotEmpty"); } else { $student_id = $_POST["student_id"]; $team_id = $_POST["team_id"]; TeamModel::addStudentToTeam($student_id, $team_id); } } }