我想让他插入到数据库是显示中文!
而不是显示数字1!
因该怎么改
图片描述
图片描述
    <?php
       $sql = "select * from bigtype";
          $result = mysql_query( $sql );
    ?>
    <select  style="width:200px;"   name="bigtype[]" id="bigtype" onchange="changelocation(document.myform.bigtype.options[document.myform.bigtype.selectedIndex].value)" size="1">
        <option>请选择套餐</option>
        <?php while($rows=mysql_fetch_array($result)){?>
        <option  value="<?php echo $rows['id']; ?>"><?php echo $rows['bigtype']; ?></option>
        <?php } ?>
    </select>
    <select style="width:100px;" class="trololo"  name="smalltype[]" id="smalltype">
        <option>请选择小类</option>
    </select>
单价:<input style="display:inline-block;width:100px;" type="text"  class="form-control" id="price_1" name="price[]" onchange="changecoat(1)" >
数量:<input style="display:inline-block;width:100px;" type="text"  class="form-control" id="count_1" name="quantity[]" onchange="changePrice(1)">
计价:<input style="display:inline-block; width:100px;" type="text"  class="form-control" id="total_1" name="valuation[]" readonly="readonly" >
<br/>
                            
                                    Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
1、你想要插入数据到到数据库,但是
php执行的是select操作2、如果
option有value属性,则提交的是value值,没有则选项的值将设置为<option>标签中的内容。