怎么同时删除多条记录

WBOY
Release: 2016-06-13 10:05:21
Original
1067 people have browsed it

如何同时删除多条记录?
就像163邮箱一样,每封邮件左边都有一个checkbox,最底下有个全选的checkbox,全选之后,全部删除即可删除全部记录
删除多条记录的sql语句我会,但问题是:怎样将这些要删除的记录的   id   的值   post   到删除页面啊,我试过了,每次得到的总是最新的一条记录的   id   ,而不是所有的我要删除的记录的id

------解决方案--------------------
chekbox的名字统一为chekbox[]或者ch[]无所谓,记得[].
post到下个页面你就会发现怎么取了.
------解决方案--------------------
表单里的复选表单。。
这样post到删除页时。数据id里的所有数据就是所有你选的id了

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!