最新下载
热门教程
- 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
相关文章
- itch.to游戏畅玩-itch.io官网入口及网页版免费即玩 01-27
- 漫画柜2026最新的登录入口地址-漫画柜在线阅读平台入口 01-27
- itch游戏官网入口-itch.io下载及网页版直达 01-27
- 超星学生登录入口-超星学生通网页版登录 01-27
- 哔咔漫画app官网极速进入-哔咔漫画官网入口在线版 01-27
- 嗨皮漫画镜像入口地址-最新备份嗨皮漫画镜像入口地址分享 01-27