states from array
This commit is contained in:
@@ -100,12 +100,12 @@
|
|||||||
$user_bvs = $user_stmt->fetchAll(PDO::FETCH_COLUMN);
|
$user_bvs = $user_stmt->fetchAll(PDO::FETCH_COLUMN);
|
||||||
$user_bvs=explode(",", $user_bvs[0]); // you need to make the CSV to array.
|
$user_bvs=explode(",", $user_bvs[0]); // you need to make the CSV to array.
|
||||||
foreach($rows as $row) {
|
foreach($rows as $row) {
|
||||||
$isChecked = in_array($row['bv'], $user_bvs);
|
$isChecked = in_array($row['bv'], $user_bvs);
|
||||||
?>
|
?>
|
||||||
<div class="flex flex-row">
|
<div class="flex flex-row">
|
||||||
<input type="checkbox" name="<?php echo $row['bv']; ?>" id="<?php echo $row['bv']; ?>" value="<?php echo $row['bv']; ?>" <?php if($isChecked) echo "checked"; ?> />
|
<input type="checkbox" name="<?php echo $row['bv']; ?>" id="<?php echo $row['bv']; ?>" value="<?php echo $row['bv']; ?>" <?php if($isChecked) echo "checked"; ?> />
|
||||||
<label for="<?php echo $row['bv']; ?>" style="text-transform: uppercase;"><?php echo $row['bv']; ?></label>
|
<label for="<?php echo $row['bv']; ?>" style="text-transform: uppercase;"><?php echo $row['bv']; ?></label>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user