当前位置:编程学习 > asp >>

如何用Access加密页面?

答案:

<%
userid = Request("userid")
userpass = Request("userpass")

Set conn = Server.CreateObject("ADODB.Connection")
DBPath = Server.MapPath("userinfo.mdb")
conn.Open "driver={Microsoft Access Driver (*.mdb)};dbq=" & DBPath

userid=trim(userid)
userpass=trim(userpass)
sql="select * from [userinfo]"
set Rs=Conn.execute(sql)
while not (Rs.bof or Rs.eof )
if userid=trim(Rs("
用户名")) and userpass=trim(Rs("口令")) then
flag = "1"
end if
Rs.movenext()
wend
if flag = "1" then
Rs.close()
else
Rs.close()
Response.Write "<center>
,此用户不存在或口令不正确!请重新输入...
</center><p align='center'>

<a href=>点击这儿返回上页.</a>"
Response.End
End If
conn.close
%>

上一个:如何控制弹出一个NTLM验证窗口?
下一个:如何测试字符串的长度?

CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,