任何人都可以帮我解决这个代码,我有几个下拉列表,我想插入到表格中。但我只需要将它插入一个字段,任何人都有一个绝妙的主意:)
这是下拉列表的示例。
<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>