日期:2014-05-17 浏览次数:20494 次
(list.php):
<form action="del.php" method="post">
<?php
$sql="select * from news where leibie='$leibieming'";
$r=$mysqli->query($sql);
while($rs=$r->fetch_assoc()){
?>
<input type="checkbox" value="<?=$rs[id]?>" /><?=$rs[title]?>
<?php
}
?>
<input type="button" value="删除"">
</form>
2、处理惩罚页面(del.php):
<?php
if($del_id!=""){
$del_num=count($del_id);
for($i=0;$i<$del_num;$i++){
$mysqli->query("delete news.......");
}
echo("<script type='text/javascript'>alert('删除乐成!');history.back();</script>");
}else{
echo("<script type='text/javascript'>alert('请先选择项目!');history.back();</script>");
}
?>