diff --git a/main/admin/session_course_edit.php b/main/admin/session_course_edit.php index d14d8b1e53..254271a489 100644 --- a/main/admin/session_course_edit.php +++ b/main/admin/session_course_edit.php @@ -43,15 +43,13 @@ if($_POST['formSent']) $id_coach=intval($_POST['id_coach']); - if(!$id_coach) $errorMsg=get_lang("SelectACoach"); - else - { - api_sql_query("UPDATE $tbl_session_course - SET id_coach='$id_coach' - WHERE id_session='$id_session' AND course_code='$course_code'",__FILE__,__LINE__); - header('Location: '.$_GET['page'].'?id_session='.$id_session); - exit(); - } + + api_sql_query("UPDATE $tbl_session_course + SET id_coach='$id_coach' + WHERE id_session='$id_session' AND course_code='$course_code'",__FILE__,__LINE__); + header('Location: '.$_GET['page'].'?id_session='.$id_session); + exit(); + } else { @@ -103,8 +101,9 @@ if(!empty($errorMsg))