网络编程 
首页 > 网络编程 > 浏览文章

如何用Access加密页面?

(编辑:jimmy 日期: 2024/11/15 浏览:3 次 )

<%
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='"FONT-FAMILY: 宋体; mso-bidi-font-size: 9.0pt; mso-ascii-font-family: ' '; mso-hansi-font-family: ' '">点击这儿返回上页.</a>"
Response.End
End If
conn.close
%>

上一篇:为什么用磁盘序列号加密过的代码不能被复制安装?
下一篇:怎样给文件加密最安全?