问题是我不知道如何组合2:radio和select选项,我有静态单选按钮和动态选择选项从数据库使用php和mysql
<label><input type="radio" name="tiptricou" value="1" checked="checked" >1</label>
<label><input type="radio" name="tiptricou" value="2">2</label>
<label><input type="radio" name="tiptricou" value="3">3</label>
<label><input type="radio" name="tiptricou" value="4">4</label>
<label><input type="radio" name="tiptricou" value="5">5</label>
<label> <input type="radio" name="tiptricou" value="6">6</label>
<label><input type="radio" name="tiptricou" value="7"></label>
和动态选择选项:
`<div id="selecteaza-marimea">
<?php
$sql="SELECT marimea FROM stocuri_tricouri where stoc_ramas > 0 order by ID";
echo "<select name='marimea'>";
echo "<option selected disabled>SELECTEAZA MARIMEA</option>";
foreach ($dbo->query($sql) as $row){
echo "<option value = $row[marimea]> $row[marimea]</option>";
}
echo "</select>";
?>
</div>`
mysql数据库
id tiptricou marimea cantitate_initiala stoc_ramas
1 1 S 250 250
2 1 M 250 250
3 1 L 250 250
4 2 XL 250 250
5 2 M 250 250
6 3 S 250 250
7 3 M 250 250
8 4 S 250 250
9 5 XL 250 250
10 6 XXL 250 250
11 6 S 250 250
12 7 S 250 250
13 7 M 250 250
如果我检查无线电1应该只显示3个数据 无线电2 = 2显示选择等等......
现在它向我显示marimea
列