<table width="100%" border="0" cellpadding="3" cellspacing="1" class="tablebg">
<tr>
<th width="100">ID</th>
<th>关键词</th>
<th width="120">查询次数</th>
<th width="80">操作</th>
<th width="40">选择</th>
</tr>
<form id="kid[]" name="kid[]" method="post" action="?action=dolistform" onsubmit="return checkform();">
<?php
echo pageshow($page,$totalpage,$total,"?action=".$action."&kw=".$kw."&");
?>
<?php
if($action=="search")
{
$where=" where";
if(!empty($kw))
{
$where.=" keyword like '%".$kw."%'";
}
else
{
$where="";
}
}
$sql="select * from ve123_search_keyword".$where;//echo $sql;
$result=$db->query($sql);
$total=$db->num_rows($result);//记录总数
$pagesize=5;//每页显示数
$totalpage=ceil($total/$pagesize);
$page=intval($_GET["page"]);
if($page<=0){$page=1;}
$offset=($page-1)*$pagesize;
$result=$db->query($sql." order by kid desc limit $offset,$pagesize");
while ($rs=$db->fetch_array($result))
{
?>
<tr>
<td><?php echo $rs["kid"]?></td>
<td><?php echo "<a target=\"_blank\" href=\"../s/?wd=".urlencode($rs["keyword"])."\" >".$rs["keyword"];?></td>
<td><?php echo $rs["hits"];?></td>
<td>
<a href="?action=modify&kid=<?php echo $rs["kid"]?>">修改</a>
<a href="?action=del&kid=<?php echo $rs["kid"];?>" onclick="if(!confirm('确认删除吗?')) return false;">删除</a> </td>
<td><input type="checkbox" name="kid[]" value="<?php echo $rs["kid"]?>" /></td>
</tr>
<?php
}
?>
<tr>
<th colspan="7">
<div align="center">
<input name="chkall" type="checkbox" id="chkall" onclick=CheckAll(this.form,'kid[]') value="checkbox">
选中本页显示的信息 <strong>操作:</strong>
<input name="do_action" type="radio" value="del" checked="checked">
删除
<input type="submit" name="Submit" value=" 执 行 ">
</div> </th>
</tr></form>
</table>
单个(即一个一个地)删除,是可以了;但多个(批量)同时删除就不行,帮改下,能支持单个删除,也能支持批量删除,谢了!! 我只会html PHP只是刚开始学的,真的不会啊!这是我的邮箱552371423#qq.com #号改成@,谢谢了!
慕盖茨4494581
汪汪一只猫
心有法竹