最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
用密码保护页面 (II)
时间:2022-06-30 09:17:07 编辑:袖梨 来源:一聚教程网
(蜘蛛精 译)
英文原文
现在我们创建查询语句,可以验证在表单中输入的内容是否与数据库中的内容相一致。
>
UserName = Request.Form("username")
Password = Request.Form("password")
'grab the form contents
Set MyConn=Server.CreateObject("ADODB.Connection")
MyConn.Open "your connection string here"
SQL = "Select * From tblLogin"
Set RS = MyConn.Execute(SQL)
If UserName = RS("UserName") AND Password = RS("Password") Then
'if there is a match then show the page
%>
Put the contents of your page here.
Else
Response.Redirect "http://www.y*ou*rdom*ain.com/login.asp"
RS.Close
MyConn.Close
Set RS = Nothing
Set MyConn = Nothing
End If
%>
'if there was no match then make the visitor try again to login.
把含上述代码的文件命名为login.asp
相关文章
- 空洞骑士丝之歌电枢球怎么拿 电枢球获取方式介绍 09-15
- 无主之地4怎么兑换骷髅钥匙码 骷髅钥匙兑换码使用方法 09-15
- 空洞骑士丝之歌掘洞钻在哪弄 掘洞钻获取方式介绍 09-15
- 超级机器人大战Y野花造访花园怎么过 第一章通关流程攻略 09-15
- 原神久岐忍天赋要升到多少级 久岐忍天赋加点攻略 09-15
- 空洞骑士丝之歌螺切刃怎么拿 螺切刃获取方法介绍 09-15