--------------------------------------------------------------------------------------------------------
Set Conn = Server.Createobject("ADODB.Connection")
Conn.open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.mappath("db/HistoricalPro.mdb")
sql = "Select * From StfPassword"
Set Rs = Server.Createobject("ADODB.Recordset")
Rs.Open sql,Conn,3,1
Rs.Movefirst
Do While Not Rs.EOF and Not RS.BOF
If Request.Form("in_user") = RS("Name") And Request.Form("in_passwd") = RS("Password") Then
User_OK = 1
Exit Do
End If
RS.Movenext
Loop
If User_OK <> 1 Then
Response.Redirect "login.asp"
End if
Tag : - - - -
Date :
18 ส.ค. 2548 17:23:09
By :
Takeshi
View :
2886
Reply :
3
No. 1
Guest
if Request("in_user") <> "" and Request("in_passwd") <> "" then
sql = "select * from StfPassword where user='"& Request.Form("in_user") &"' and pass='"& Request.Form("in_passwd") &"'"
Set Rs = Server.Createobject("ADODB.Recordset")
Rs.Open sql,Conn,3,1
end if
if not Rs.eof then Response.Redirect "ไปหน้าที่ต้องการ.asp" end if