deSort.php 469 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. header("Content-type:text/html;charset=UTF-8");
  3. include_once("../../untils/conn.php");
  4. if (empty($_GET['id'])) {
  5. exit('<h1>连接数据库失败</h1>');
  6. }
  7. $id = $_GET['id'];
  8. $query = mysqli_query($con, "delete from sort where id = {$id}");
  9. if (!$query) {
  10. echo ("<script>alert('删除失败');history.back();</script>");
  11. } else {
  12. echo "<script>alert('删除信息成功');window.location.replace(document.referrer)</script> ";
  13. }
  14. ?>
  15. <?php
  16. ?>