誰でもこのコードの解決を手伝ってくれます。テーブルに挿入したいドロップダウンリストがいくつかあります。しかし、私はそれを1つのフィールドにのみ挿入する必要があります。誰もがそれを行う方法を素晴らしいアイデアを持っています:)
これはドロップダウン リストの例です。
<select name="level1" style="width:225px;">
<option value=0 selected></option>
<?php
include 'connect.php';
$q = "SELECT attribute_id,attribute_name FROM attribute ";
$result = $db->query($q);
while ($row1 = $result->fetch()){
echo "<option value='$row1[attribute_name]'>$row1[attribute_name]</option>";
}
?>
</select>
<select name="level1" style="width:225px;">
<option value=0 selected></option>
<?php
include 'connect.php';
$q = "SELECT attribute_id,attribute_name FROM attribute ";
$result = $db->query($q);
while ($row1 = $result->fetch()){
echo "<option value='$row1[attribute_name]'>$row1[attribute_name]</option>";
}
?>
</select><br>
<select name="level1" style="width:225px;">
<option value=0 selected></option>
<?php
include 'connect.php';
$q = "SELECT attribute_id,attribute_name FROM attribute ";
$result = $db->query($q);
while ($row1 = $result->fetch()){
echo "<option value='$row1[attribute_name]'>$row1[attribute_name]</option>";
}
?>
</select>