时间:2021-07-01 10:21:17 帮助过:3人阅读
图片描述
- <code><br> <!--?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>
- </code>
我想让他插入到数据库是显示中文!
而不是显示数字1!
因该怎么改
图片描述
图片描述
- <code><br> <!--?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>
- </code>
1、你想要插入数据到到数据库,但是php
执行的是select
操作
2、如果option
有value
属性,则提交的是value
值,没有则选项的值将设置为 标签中的内容。