蘭庭論壇
標題:
ASP帳密認證語法
[打印本頁]
作者:
李亮寬
時間:
2013-9-18 12:32
標題:
ASP帳密認證語法
<%
dim nid,nname,npassword
pass=session("pass")
id=request("id")
password=request("password")
if pass<>"ok" then
Set conn = Server.CreateObject("ADODB.Connection")
DBPath = Server.MapPath("..\使用者密碼.mdb")
conn.Open "driver={Microsoft Access Driver (*.mdb)};dbq=" & DBPath
sql="Select * from 密碼表 where id='" & id & "' and password='" & password & "'"
set rs=conn.execute(sql)
do while not rs.eof
session("name")=rs("name")
pass="ok"
rs.movenext
loop
end if
%>
歡迎光臨 蘭庭論壇 (http://120.101.203.2/)
Powered by Discuz! X3.2