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

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

WBOY
WBOYOriginal
2016-06-13 13:45:221206browse

这个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
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