複数選択チェックボックスがありますが、各チェックボックスがデータベースに新しい行を作成するデータベースへの挿入方法を見つけることができませんでした。複数選択チェックボックスの値をデータベースに挿入する方法
this is how my dropdown looks like
<select id="plant" name="plant[]" class="form-control" multiple="multiple">
<?php
$query_plant = "SELECT * FROM plant WHERE plant_enable=1 ORDER BY plant_name";
$rs_plant = DB_Query($query_plant);
while ($row_plant = DB_FetchRow($rs_plant)) {
$plant.='<option name='.$row_plant["plant_shortname"].' value='.$row_plant["plant_id"].'>' .$row_plant["plant_name"].' ['.$row_plant["plant_id"].']</option>';
}
mysql_free_result($rs_plant);
echo $plant;
?>
</select>
場合は、これは捨てられた質問ですか? –
私はちょうど答えを掲載しました。このページでまだ新しいのはごめんなさい – NFSJ