%
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(" |
|
<%
If (FormErrorMsg <> "") Then
wl(FormErrorMsg & " ")
End If
%>
|
<%wl("")%>