We generally get the data submitted by the form, if we use checkbox[] to operate, see the example below.
-
if ($_post)
{
Print_r ($_post);
The loss is also stored in the form of data,
/*
Array
(
[checkbox] = = Array
(
[0] = 1
[1] = 2
[2] = 3
)
[Button] = Submit
)
This is good operation, we just need to follow
*/
$array = $_post[' checkbox '];
Print_r ($array);
/*
Get the content as follows
Array
(
[0] = 1
[1] = 2
[2] = 3
)
In fact, it is what we want, we can use the SQL in to bulk implementation of the deletion.
*/
$ids = Implode (', ', $array);
$sql = "Delete from table name where ID in ($ids)";
MySQL tutorial _query ($sql);
This enables the implementation of the bulk deletion of the data Oh.
This site original reprint annotated source http://www.bKjia.c0m otherwise must investigate!
}
http://www.bkjia.com/PHPjc/630761.html www.bkjia.com true http://www.bkjia.com/PHPjc/630761.html techarticle we generally get the data submitted by the form, if we use checkbox[] to operate, see the example below. --form Id=form1 name=form1 method=post action= 1 input type=checkbox ...