<?php
// 包含数据库文件
require_once 'dbconn.php';
// 获取删除的id
$id = $_GET ['id'];
echo $id;
$sql = "delete from info where id='$id'";
mysql_query ( $sql, $con );
$row = mysqli_affected_rows ( $con );
;
if ($row >= 1) {
alert ( "删除成功" );
// 跳转到用户列表页面
href ( "userListt.php" );
} else {
alert ( "删除失败" .$id);
// 跳转到用户列表页面
href ( "userListt.php" );
}
function alert($title){
echo "<script type='text/javascript'>alert('$title');</script>";
}
function href($url){
echo "<script type='text/javascript'>window.location.href='$url'</script>";
}
mysqsl_close($con);
?>
添加回答
举报
0/150
提交
取消