欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

如何用Access加密页面?

程序员文章站 2022-05-03 15:41:53
<%userid = request("userid")userpass = request("userp...

<%
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='javascript:history.go(-1);'>点击这儿返回上页.</a>"
response.end
end if
conn.close
%>