📄 delete.asp
字号:
<!--#INCLUDE FILE="odbc_connection.asp"-->
<!--#INCLUDE FILE="config.asp"-->
<html>
<head>
<title>删除留言</title>
<link rel="stylesheet" href="guest.css">
</head>
<body >
<%
'获取传递过来的要删除的记录编号id
Dim id
id=Request.QueryString("id")
%>
<h2 align="center">删除留言</h2>
<!--注释:提交到本页面时,令action="",或者action="本页面名称"-->
<form method="post" action="delete.asp" name="form1">
<table border="0" width="80%" bgcolor="#203F80" align="center">
<tr>
<td><font color="white">请输入删除密码:</font></td>
<td><input type="password" name="password" size="10" value=""></td>
</tr>
<tr>
<td><input type="hidden" name="id" value="<%=id%>"></td>
<td><input type="submit" value=" 提交 " size="20"></td>
</tr>
</table>
</form>
<%
'这里判断一下,如果密码和配置文件中的密码相等,则删除该留言
If Request("password")=Password then
strSql="delete from guest where id=" & Request.Form("id")
db.execute(strSql)
response.redirect("index.asp")
Else
Response.Write "<p align='center'>请输入正确的密码"
End If
%>
</body>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -