<% Dim FormErrorMsg Set Conn = dbOpen("rwl") Public Sub RetrieveCustomer() set rs = Server.CreateObject("ADODB.Recordset") SQL = "SELECT * FROM Customers " & _ "WHERE Username = '" & CleanSQL(stripHTML(Session("Username")), "a") & "' AND " & _ "Passwords = '" & CleanSQL(stripHTML(Session("Password")), "a") & "'" rs.Open SQL, Conn, adOpenKeyset, adLockOptimistic If (rs.RecordCount >= 1) Then CustomerID = rs("CustomerID") Session("Organization")=rs("Organization") Else FormErrorMsg = FormErrorMsg & "We cannot find your customer information.
Please try again or Push the sign up button to become a new member.
" CustomerID = 0 rs.Close set rs = Nothing Session("Username") = "" Session("Password") = "" ' Make variable no longer be an object ... rs = "" End If ' Leave recordset open for subsequent display. End Sub %>
<% If Request.Form("Username") <> "" then Session("Username")=Request.Form("Username") Session("Password")=Request.Form("Password") End if ButtonPress = LCase(GetFormAction()) Select Case True Case ButtonPress = "login" iPass = 2 Call RetrieveCustomer() End Select %> <%Dim reqcat if Request("Category") <> "" then reqcat = "?Category=" & Request("Category") else reqcat = "" End if ' wl("
") wl("") ' Master table start ... ' Start login section (if enabled) ... wl("") wl("") wl("") wl("") wl("") wl("") wl("") wl("") if session("Username") = "" then wl("") wl("") else wl("") wl("") end if if Session(sesItemCount) <> "0" then wl("") end if wl("") wl("
User Name: ") wl(" "" then wl ("readonly='' class=txtback") end if wl("SIZE=15 MAXLENGTH=35 class=styGenFieldUserInput> Password:  "" then wl ("readonly='' class=txtback") end if wl(">  
") %>
 
<% If (FormErrorMsg <> "") Then wl(FormErrorMsg & "
") End If %>
<%wl("")%>