district select

This commit is contained in:
Walter Hupfeld
2024-02-22 14:30:28 +01:00
parent f695c98fc3
commit f8b8feee5b
5 changed files with 50 additions and 7 deletions

View File

@@ -137,7 +137,25 @@
<input type="submit" class="btn btn-primary" value="Konfiguration ändern">
</form>
<?php endif; ?>
<br><br><br>
<br><br><br>
<h2>Auswahl Kreise und kreisfreie Städte</h2>
<form method="post" id="districtform" action="district_chk.php">
<?php
$strSQL="select * from district order by district";
$result = $db->query($strSQL);
while ($row = $result->fetch(PDO::FETCH_ASSOC)) {
$strChecked= ($row['active']==1) ? "checked='checked'" : "";
$strValue=$row['active'];
$strDistrict=$row['district'];
echo "<input type='checkbox' $strChecked id='$strDistrict' name='$strDistrict' value='$strValue'> ";
echo "<label for='$strDistrict'>".$row['title']."</label><br>\n";
}
?>
<br>
<input type="hidden" name="csrf" value="<?=$_SESSION['csrf_token']?>">
<input type="submit" class="btn btn-primary" value="Auswahl ändern">
</form>
</div>
</div> <!-- row -->
</div>