From 45a1bdd1e41ffb9fd6f6c97dc94495194554ad24 Mon Sep 17 00:00:00 2001 From: james Date: Thu, 20 Mar 2008 16:28:50 +0000 Subject: [PATCH] Only set the school if the school is posted through, this way we dont whipe out a students school. -This line, and those below, will be ignored-- M student_editor.php --- admin/student_editor.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/admin/student_editor.php b/admin/student_editor.php index 954397a..4656daf 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