<% Set conn = Server.CreateObject("ADODB.Connection") strPath = Server.MapPath("login.asp") strPath = replace(strpath, "\login.asp", "") strPath = replace(left(strPath, instrrev(strPath ,"\")), "\", "/") conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & strPath & "/iaCalendar.mdb" If Request("submited")="true" then login =1 username = Replace(Request("u"), "'", "''") password = Replace(Request("p"), "'", "''") sql = "SELECT * FROM Users WHERE (UserName='" & username & "') AND (Password='" & password & "')" Set rs = Server.CreateObject("ADODB.Recordset") rs.Open sql, conn, 3, 3 If rs.recordcount > 0 and len(trim(request("u")))>0 then Session("adminid") = rs("UserID") conn.close set conn=nothing response.redirect "default.asp" End if End If conn.close set conn=nothing %> IA-Calendar Administration Login




IA-Calendar Administration Login
<% If login=1 then%>Invalid Login<% Else %> <% End If %>
User: 
Password: