![]() |
Sergey Kornilov admin 5/4/2004 |
Here is the sample code that you can use. You can place it to the login page and remove all input boxes that ask username and password. Set rs = server.CreateObject("ADODB.Recordset") set dbConnection = server.CreateObject("ADODB.Connection") dbConnection.ConnectionString = strConnection dbConnection.Open Call ReportError strSQL = "select * from LoginTable where UserNameField='" & Request.ServerVariable("AUTH_USER") & "'" rs.open strSQL, dbConnection Call ReportError If Not rs.EOF Then Session("UserID") = Request.ServerVariable("AUTH_USER") Response.Redirect list.asp else Response.Write "Login failed" end if
|