From 637c2f748e532ee8c83304cf468b656fc8adb673 Mon Sep 17 00:00:00 2001 From: Armanveer Gill Date: Fri, 3 Jan 2025 16:15:26 -0500 Subject: [PATCH] fixed the issue of provinces being not displayed in the dropdown. I had not specified which type of fetch operation it was. --- admin/committees.php | 2 +- common.inc.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/admin/committees.php b/admin/committees.php index e5a22b46..0a5fdc3a 100644 --- a/admin/committees.php +++ b/admin/committees.php @@ -174,7 +174,7 @@ if(get_value_from_array($_POST,'committees_id') && get_value_from_array($_POST,' if(get_value_from_array($_POST, 'action')=="assign") { - if(get_value_from_array($_POST, 'committees_id') && get_vaue_from_array($_POST,'users_uid')) { + if(get_value_from_array($_POST, 'committees_id') && get_value_from_array($_POST,'users_uid')) { $cid = intval($_POST['committees_id']); $q = $pdo->prepare("SELECT * FROM committees_link WHERE committees_id='$cid' AND users_uid='$uid'"); $q->execute(); diff --git a/common.inc.php b/common.inc.php index 69007361..2f3c5776 100644 --- a/common.inc.php +++ b/common.inc.php @@ -852,7 +852,7 @@ function emit_province_selector($name,$selected="",$extra="") if($q->rowCount()==1) { - $r = $q->fetch(); + $r = $q->fetch(PDO::FETCH_OBJ); echo "code\">"; echo i18n($r->province); @@ -862,7 +862,7 @@ function emit_province_selector($name,$selected="",$extra="") echo "