delete.asp

来自「自己做的一个网站」· ASP 代码 · 共 30 行

ASP
30 行
字号
<% option explicit %>
<% response.buffer=true %>
<!--#include file="conn1.asp"-->
<html>
<head>
<title>删除留言</title>
</head>
<body BGCOLOR=#9933CC>
<form method="post" action="" name="form1">
  <p align="center">请输入删除密码:
  <input type="password" name="password">
  <input type="submit" value="确定">
</form>
<%
if request.form("password")="123456" then 
  dim sql,id
  id=request.querystring("id")
  sql="delete from tguest where id=" & id
  conn1.execute(sql)
  conn1.close
  set conn1=nothing 
  response.redirect "guestbook.asp"
elseif request("password")<>"" then
response.write"密码错误,请重新输入"
end if
%>
<hr width="80%" noshade size="1">
<div align="center"><a href="guestbook.asp">返回</a></div>
</body>
</html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?