8.7w+
社区成员
<a href="javascript:if(confirm('确认删除吗?'))window.location='delete_rs.php?Id=<?php echo $array['Id']?>'">删除</a>
<?php
header('content-type:text/html;charset=utf-8');
session_start();
if(!isset($_SESSION['user_name'])){
echo "<script>parent.location.href='login.php';</script>";
}else{
require_once 'conn.php';
$ess_Id=$_GET['Id'];
$sql="delete from event_subscribe where Id='".$Id."'";
$rs=mysql_query($sql);
if($rs){
echo "<script>alert('删除成功');window.location.href='list.php';</script>";
}else{
echo "<script>alert('删除失败');window.location.href='list.php';</script>";
}
}
?>
这是delete_rs.php 的代码 求教删除确认的和阻止跳转的要放在哪里