include 'conn.php'; $id = $_GET['id']; $query="delete from message where id=".$id; mysql_query($query); ?> //页面跳转,实现方式为javascript $url = "list.php"; echo ""; ?>
preEdit.php
复制代码 代码如下:
include 'conn.php'; $id=$_GET[id]; $query="SELECT * FROM message WHERE id =".$id; $result=mysql_query($query); while ($rs=mysql_fetch_array($result)){ ?>
postEdit.php
复制代码 代码如下:
include 'conn.php'; $query="update message set user='$_POST[user]',title='$_POST[title]',content='$_POST[content]' where id='$_POST[id]'"; mysql_query($query); ?> //页面跳转,实现方式为javascript $url = "list.php"; echo ""; ?>
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn