[PHP] php 执行sql语句 →→→→→进入此内容的聊天室

来自 , 2019-02-07, 写在 PHP, 查看 140 次.
URL http://www.code666.cn/view/36144052
  1. <?php
  2.         session_start();
  3.         include 'conn/conn.php';
  4.         $id=$_GET['id'];
  5.         $delsql = "delete from tb_mess where id = ".$id;
  6.         $rst = mysql_query($delsql);
  7.         if(mysql_affected_rows() == 1){
  8.                 echo "<script>alert('删除成功');location='".$_SERVER['HTTP_REFERER']."';</script>";
  9.         }else{
  10.                 echo "<script>alert('已删除');location='".$_SERVER['HTTP_REFERER']."';</script>";
  11.         }
  12. ?>

回复 "php 执行sql语句"

这儿你可以回复上面这条便签

captcha