设为首页】 【加入收藏】 【网站地图】 【商品折扣
娱乐一生 娱乐明星
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
首页  |  java  |  .NET  |  C/C++  |  网页技术  |  php  |  asp  |  delphi  |  VC  |  VB开发  |  游戏开发  |  软件工程  |  Power Builder  |  Linux开发  |  Windows开发技巧
当前位置:首页 >> ASP实例 >> 用密码保护页面 (II)_ASP实例_src119.com

用密码保护页面 (II)_ASP实例_src119.com -

英文原文


现在我们创建查询语句,可以验证在表单中输入的内容是否与数据库中的内容相一致。

<%@ Language=V cript %>
<% Re o e.Buffer = True %>

<HTML>
< ODY>

<% Se ion("allow") = True %>

<%
UserName = Request.Form("username")
Pa word = Request.Form(" a word")
'grab the form contents

Set MyCo =Server.CreateObject("ADODB.Co ectio quot;)
MyCo .Open "your co ection string here"

SQL = " elect * From tblLogi quot;
Set RS = MyCo .Execute(SQL)

If UserName = RS("UserName") AND Pa word = RS(" a word") Then
'if there is a match then show the page
%>


Put the contents of your page here.

<%
Else
Re o e.Redirect "http://www.yourdomain.com/login.a quot;
RS.Close
MyCo .Close
Set RS = Nothing
Set MyCo  = Nothing
End If
%>
'if there was no match then make the visitor try again to login.

</BODY>
</HTML>


把含上述代码的文件命名为login.a 



 

娱乐图摘

更多 >>

靓丽清纯美女meimei

美女私房全裸照
导演劝女演员脱衣服(视频)

大胆火辣人体艺术写真(图)

黑丝妹妹热辣诱惑-丝袜美女妹妹

PLMM 漂亮妹妹图集-妹妹图库

全球美女图库-美女集中营

52MM 我爱漂亮妹妹-制服妹妹诱惑

图王图库-世界美女明星图片资料库
美女写真集锦

激情两性-解密性生活
浴室MM湿身内衣诱惑
邻家小妹洗澡被偷拍(视频)

热点文章

更多

· XMLHTTP+Javascript+Asp写得聊天室,无刷
· 让您的主页支持各种浏览设备(ASP+篇)(下)_ASP实例_
· 将你的网站设置为客户的信任站点--WSH方案_ASP实例_s
· W3 Jmail中文使用说明_ASP实例_src119.co
· 利用XSL和ASP在线编辑XML文档_ASP实例_src11
· 一种在线人数统计方法(只用1个APPLICATION)_AS
· aspemail组件的应用_ASP实例_src119.com
· ASP连接执行程序 _ASP实例_src119.c
· 嵌入式Web视频点播系统实现方法_ASP实例_src119.
· 利用ASP实现三个强大功能之三_ASP实例_src119.c

热点文章

更多