简单后台监控的实现

时间:2025-01-14 11:50:43
<?php
error_reporting(E_ALL &~E_DEPRECATED);
include("");


$bt1=$_GET['li'];




if (isset($_COOKIE['username1']))
$name=$_COOKIE['username1'];


mysql_select_db("zhuce")or die("无法选择数据库!");
$t=date('y-m-d H:i:s',time());


$query="INSERT INTO htjk(name,time,caozuo,btitle)value('$name',now(),'删除','文章$bt1')";


$result=mysql_query($query,$connection)or die("存入数据失败!");
mysql_close($connection)or die("无法断开与数据库的链接!");


?>
<?php
error_reporting(E_ALL &~E_DEPRECATED);
include("");
mysql_select_db("guest")or die("无法选择数据库!");
$bt1=$_GET['li'];
$sqlstr="delete from guestlist where btitle='$bt1'";
$result=mysql_query($sqlstr,$connection);
if($result){
echo"<script>alert('删除成功');location='';</script>";
}
else{echo"删除失败";
}
?>