Log ud funktion - men hvordan?
Jeg har implementeret dette login på min side....<%
SET RS = Server.CreateObject("ADODB.Connection")
rs.Open "Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("usersystem.mdb")
If Request("mode") = "Check" then
' Authes user, password, and fixed a known securitybug to many login systems.
strUsername = Trim(Replace(request("username"),"'","''" ))
strPassword = Trim(Replace(request("password"),"'","''" ))
Sql = "Select Count(*) as Found from users where (username = '" & strUsername & "') and (password ='" & strPassword & "')"
Set LO = RS.Execute(Sql)
if LO("Found") = 0 then
Session("login") = ""
error = "You´re not authed be the system"
else
strDSN = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath("usersystem.mdb")
Set myConn = Server.CreateObject("ADODB.Connection")
myConn.Open strDSN
strSQL = "SELECT * FROM users where (username = '" & Request("username") & "') and (password ='" & Request("password") & "')"
Set ez = myConn.Execute(strSQL)
Session("login") = "Authed"
Response.Redirect "http://www.graphical.dk/admin/default2.asp"
EZ.Close
RS.Close
Conn.Close
End if
End if
%>
MEN hvordan kan jeg lave en logud funktion?
