删除页面
<?php
//判断是否接受到id
if(empty($_GET['id'])){
exit('没有接收到数据');
}
$id=$_GET['id'];
$conn =mysqli_connect('localhost','root','h199826','yitu');
if (!$conn) {
exit('<h1>连接数据库失败</h1>');
}
$query = mysqli_query($conn, "delete from users where id={$id};");
if (!$query) {
exit('<h1>查询数据失败</h1>');
}
header('Location:user.php');
?>
删掉了cc的用户