我想知道如何将$row['id']用户选择的内容保存到准备存储到我的数据库的变量中。
我可以解决这样的问题吗?
<form action="shippingmethod.php" method="post" role="form" class="send-it-test">
<select class="form-control search-slt" name="selezione_sede">
<?php
$sql = "SELECT id,city,address FROM sedi ORDER BY city";
$ris = mysqli_query($db,$sql);
while($row = mysqli_fetch_array($ris)){
echo "<option value='" . $row['id']."'>" . $row['city'] ." ,". $row['address']."</option>";
}
?>
</select>
<div class="text-center">
<button type="submit">Send</button>
</div>
</form>
猛跑小猪