最新下载
热门教程
- 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
相关文章
- 如何将高清电影刻录到DVD 03-27
- 微信语音消息录音异常怎么办 03-27
- 漫蛙漫画-漫蛙MANWA2官网网页入口 03-27
- 小智桌面怎么设置鼠标悬停切换标签 03-27
- DeepSeek官网最新入口在哪-DeepSeek网页版免登录直接访问 03-27
- 樱花动漫免费下载官方入口-樱花动漫全平台免费下载最新版本 03-27