del_account.php
来自「痕经典的delphi源码教程」· PHP 代码 · 共 18 行
PHP
18 行
<?php
session_start();
include("dbconnect.inc.php");
include("functions.inc.php");
if($_GET["id"]!="" && $_SESSION["userid"]==1 && is_numeric($_GET["id"]) && $_GET["id"]!="1") {
$id = $_GET["id"];
}else {
die("您无权访问该页,请返回或重试。");
}
$sql = "delete from users where id={$id}";
$res = mysql_query($sql);
if(!$res) {
echo mysql_error();
die("数据库出错,请返回重试。");
}
header("Location:msg.php?m=del_success");
?>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?