check.asp
来自「标准的小型企业网站程序」· ASP 代码 · 共 43 行
ASP
43 行
<!--#include file=conn.asp-->
<%
dim sql
dim username
dim password
username=replace(trim(request("username")),"'","")
password=replace(trim(Request("password")),"'","")
set rs=server.createobject("adodb.recordset")
sql="select * from admin where password='"&password&"' and username='"&username&"'"
rs.open sql,conn,1,1
if not(rs.bof and rs.eof) then
if password=rs("password") then
session("admin")=rs("username")
rs.close
set rs=nothing
Response.Redirect "admin.asp"
end if
end if
rs.close
set rs=nothing
%>
<html>
<head>
<link rel='stylesheet' href='style.css'>
</head>
<body>
<br><br><br>
<table align='center' width='300' border='0' cellpadding='4' cellspacing='0' class='border'>
<tr >
<td height='15' colspan='2' align="center" class='title'>操作: 确认身份失败!</td>
</tr>
<tr>
<td height='23' colspan='2' align="center" class='tdbg'> <br>
<br>
用户名或密码错误!!!<br>
<br> <a href='javascript:onclick=history.go(-1)'>【返回】</a> <br>
<br></td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?