📄 checkuser.asp
字号:
<!--#include file="conn.asp"-->
<!--#include file="md5.asp"-->
<%
if request.form("user")="" then
response.write"<script language=javascript>alert('用户名必须填写');this.location.href='index.asp';</script>"
end if
if request.form("password")="" then
response.write"<script language=javascript>alert('密码必须填写');this.location.href='javascript:history.go(-1)';</script>"
end if
username=request("user")
password=md5(request("password"))
set rs=server.createobject("adodb.recordset")
sql="select * from member where cname='"&username&"'"
rs.open sql,conn,1,1
if rs.eof then
response.write"<script language=javascript>alert('此用户名尚未注册');this.location.href='index.asp';</script>"
response.end
else
pass=rs("password")
if pass<>password then
response.write"<script language=javascript>alert('密码错误');this.location.href='javascript:history.go(-1)';</script>"
response.end
end if
session("user")=username
response.redirect"index.asp"
end if
rs.close
set rs=nothing
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -