Home  >  Article  >  Backend Development  >  复选框操作数据库的有关问题

复选框操作数据库的有关问题

WBOY
WBOYOriginal
2016-06-13 12:49:21776browse

复选框操作数据库的问题
表名:sale_order
表结构:
ID
order_id
name
quantity
Price
Address
Region

现在是这样,这个表内容我会显示在一个页面上,然后每条记录有个复选框,复选想要处理的记录,点提交

把复选的数据汇总处理

我的问题是怎么对选择的数据进行处理,对整个表的数据进行汇总我会。


------解决方案--------------------
在输出到页面的时候,给每条记录前加一个" />,我想你的问题可能就是这个value属性值,很简单,像我这样,把value=""中间再插入PHP代码,然后把你记录的数据通过echo输出,这样在点击处理数据之后,就可以在$_POST['checkbox']里找到数据了,你可以var_dump($_POST['checkbox']);看一下
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn