<% 'Dimension variables' Dim adoCon 'Holds the Database Connection Object' Dim rsEmpInfo 'Holds the recordset for the records in the database' Dim strSQL 'Holds the SQL query to query the database ' 'Create an ADO connection object' Set adoCon = Server.CreateObject("ADODB.Connection") 'Set an active connection to the Connection object using a DSN-less connection' adoCon.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("Users.mdb") 'Create an ADO recordset object' Set rsEmpInfo = Server.CreateObject("ADODB.Recordset") 'Initialise the strSQL variable with an SQL statement to query the database' strSQL = "SELECT Users.Id, Users.Password FROM Users;" strSql2 = "select * from Users where Id = '" & trim(request.form("user")) & "' and Password = '" & trim(request.form("pass")) & "'" if request.form("login") <> 1 then %> CPST Login

 

Coldstream Employee Login

Username:
Password:
Go to www.coldstreamlabs.com

 

 

<% else 'response.write strSql' rsEmpInfo.open strSql2, adoCon if rsEmpInfo.eof = false then 'response.write "Login correct"' session("user") = rsEmpInfo("Id") Session.Timeout=30 rsEmpInfo.close response.redirect("EmpInfo.asp") else response.redirect("EmployeeLogin.asp") end if end if %>