Home > Backend Development > PHP Tutorial > <INPUT class="checkbox" type="checkbox" name="ids[]" value="$audio[id]">该怎么解决

<INPUT class="checkbox" type="checkbox" name="ids[]" value="$audio[id]">该怎么解决

WBOY
Release: 2016-06-13 13:45:22
Original
1240 people have browsed it

这个name="ids[]"有什么用?

------解决方案--------------------
ids[]=1;
ids[]=2;
传到php是个数组
$_POST[ids]=array(1,2);
------解决方案--------------------
name="ids[]",这里是复选框 checkbox,
这里可以存储用户的id,一些批量操作,需要获取用户的id,比如批量删除,审核用户 等等
在php页面 $_POST['ids'],可以获得多个用户的id,进而进行相应的业务.
LZ可以把问题说的再详细点.
------解决方案--------------------
$ids=$_POST['ids']; 


这里传到 action
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