diff --git a/admin/student_editor.php b/admin/student_editor.php index 954397a2..4656daf0 100644 --- a/admin/student_editor.php +++ b/admin/student_editor.php @@ -95,10 +95,11 @@ if($_POST['action']=="save") { $schoolquery=""; } - else - { + else if($_POST['schools_id'][$x]) { $schoolquery="schools_id='".mysql_escape_string(stripslashes($_POST['schools_id'][$x]))."', "; } + else + $schoolquery=""; //UPDATE existing record