📄 user.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#Include file="odbc_conn.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body>
<%
dim sname,password,sql,rs,sql3,rs2
sname=request.Form("sname")
session("name")=request.Form("sname")
password=request.Form("password")
if sname="小珍" and password="2146718" then
response.Redirect "admin.asp"
else
if sname="" then
response.Write "姓名不能为空!"
response.End()
else if password="" then
response.Write "请输入您的密码!"
response.End()
else sql3="select * from users where name='"&sname&"'"
set rs=server.CreateObject("adodb.recordset")
rs.open sql3,conn,1
if rs.recordcount="" then
response.Write "对不起,不存在该用户,想要注册吗?"
response.End()
else
sql="select password from users where name='"&sname&"'"
'response.Write sql
'response.End()
set rs2=server.CreateObject("adodb.recordset")
rs2.open sql,conn,1
' set rs=conn.execute(sql)
if rs("password")<>password then
response.Write "对不起,您输入的密码不正确!"
response.End()
end if
end if
end if
end if
end if
response.Redirect "first.asp"
%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -