del.php 地址栏上输入localhost/del.php?id=1
代码语言:javascript复制<?php
include 'conn.php';
$id = $_GET['id'];
$query="delete from message where id=".$id;
mysql_query($query);
?>
//引入conn文件,使用get方式获取id,使用sql语句来删除id
<?php
//页面跳转,实现方式为javascript
$url = "list.php";
echo "<script>";
echo "window.kk='$url'";
echo "</script>";
?>