Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/mysql/69.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 如果选中单选按钮,则动态选择选项_Php_Mysql - Fatal编程技术网

Php 如果选中单选按钮,则动态选择选项

Php 如果选中单选按钮,则动态选择选项,php,mysql,Php,Mysql,问题是我不知道如何组合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> <l

问题是我不知道如何组合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>
1
2.
3.
4.
5.
6.
和动态选择选项:

       `<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>`
`

你试过Ajax吗?保持原样,但无论何时单击/检查->通过Ajax更新选择/PHPi'm 0 with Ajax,您有什么我可以使用的吗?您可以检查->单击收音机,值被jQuery截获,而不是将Ajax发布到PHP->PHP响应发送回
选择
(将由DB的响应填充)我建议您检查前面评论中提到的选项,然后尝试编写一些代码,如果有问题,请发布另一个问题,包括g标记
jQuery
+
Ajax
+
PHP