fixed the issue of provinces being not displayed in the dropdown. I had not specified which type of fetch operation it was.

This commit is contained in:
Armanveer Gill 2025-01-03 16:15:26 -05:00
parent a988f61a34
commit 637c2f748e
2 changed files with 3 additions and 3 deletions

View File

@ -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, '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']); $cid = intval($_POST['committees_id']);
$q = $pdo->prepare("SELECT * FROM committees_link WHERE committees_id='$cid' AND users_uid='$uid'"); $q = $pdo->prepare("SELECT * FROM committees_link WHERE committees_id='$cid' AND users_uid='$uid'");
$q->execute(); $q->execute();

View File

@ -852,7 +852,7 @@ function emit_province_selector($name,$selected="",$extra="")
if($q->rowCount()==1) if($q->rowCount()==1)
{ {
$r = $q->fetch(); $r = $q->fetch(PDO::FETCH_OBJ);
echo "<input type=\"hidden\" name=\"$name\" value=\"$r->code\">"; echo "<input type=\"hidden\" name=\"$name\" value=\"$r->code\">";
echo i18n($r->province); echo i18n($r->province);
@ -862,7 +862,7 @@ function emit_province_selector($name,$selected="",$extra="")
echo "<select name=\"$name\" $extra>\n"; echo "<select name=\"$name\" $extra>\n";
echo "<option value=\"\">".i18n("Select a {$config['provincestate']}")."</option>\n"; echo "<option value=\"\">".i18n("Select a {$config['provincestate']}")."</option>\n";
while($r = $q->fetch()) while($r = $q->fetch(PDO::FETCH_OBJ))
{ {
if($r->code == $selected) $sel="selected=\"selected\""; else $sel=""; if($r->code == $selected) $sel="selected=\"selected\""; else $sel="";