From d77616a4388e9168627f81b84a4e5ef2eb5f32d4 Mon Sep 17 00:00:00 2001 From: dave Date: Sat, 26 Sep 2009 00:10:57 +0000 Subject: [PATCH] - Fix award info saving - Fix clearing out divisons/categories --- admin/award_awards.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/admin/award_awards.php b/admin/award_awards.php index 92f4960..9fee1ab 100644 --- a/admin/award_awards.php +++ b/admin/award_awards.php @@ -67,21 +67,22 @@ if(array_key_exists('name', $_POST)) { /* These values may be disabled, if they name key exists, assume * they aren't disabled and save them too */ - $q .= "name='".mysql_escape_string(stripslashes($_POST['name']))."', + $q .= ",name='".mysql_escape_string(stripslashes($_POST['name']))."', criteria='".mysql_escape_string(stripslashes($_POST['criteria']))."', - sponsors_id='".intval($_POST['sponsors_id'])."'"; + sponsors_id='".intval($_POST['sponsors_id'])."' "; } $q .= "WHERE id='$id'"; mysql_query($q); print_r($_POST); echo $q; + echo mysql_error(); happy_("Award information saved"); exit; case 'eligibility_load': $id = intval($_GET['id']); //select the current categories that this award is linked to - $reg = array(); + $ret = array('categories'=>array(), 'divisions'=>array() ); $q=mysql_query("SELECT * FROM award_awards_projectcategories WHERE award_awards_id='$id'"); while($r=mysql_fetch_assoc($q)) { $ret['categories'][] = $r['projectcategories_id'];