<% Response.Buffer = True %> <% Dim strCustEmail strCustEmail = Request("Email") Dim strCustPWD strCustPWD = Request("PWD") Dim strCustNumber, strDate, strTime strDate = Date() strTime = Time() DIM mySQL, objRS mySQL = "SELECT * FROM Customers Where Email='"& strCustEmail &"' and PWD='" & strCustPWD & "'" Set objRS = Server.CreateObject("ADODB.Recordset") objRS.Open mySQL, objConn IF objRS.EOF THEN Response.Redirect "send_pwd.asp?CartId=" & strCartId Response.End Else Response.Cookies("CustLogin")("CustEmail") = strCustEmail Response.Cookies("CustLogin")("CustPWD") = strCustPWD Response.Cookies("CustLogin").Expires = Now() + 1 Session("CustEmail") = strCustEmail Session("CustPWD") = strCustPWD Session("CustFName") = objRS("FName") strCustNumber = objRS("CustNumber") Session.Timeout = 60 objConn.Execute "Update Customers Set LastLoginDate = '"& strDate &"', LastLoginTime = '"& strTime &"' Where CustNumber = "& strCustNumber &"" END IF objRS.Close Set objRS = Nothing objConn.Close Set objConn = Nothing Response.Redirect "cust_home.asp" %>