<% 'Set all form variable values equal to NULL strCustomerEmail = "" strCustomerId = "" 'Retrieving form input and assigning to a variable 'txtUserName is the name of a text box on the form strCustomerEmail = Request.Form ("txtCustomerEmail") strCustomerId = Request.Form("txtCustomerId") 'This code only runs if the submit button is clicked if Request.Form <> "" then 'Sets an error message if any required fields are left blank if strCustomerEmail = "" or strCustomerId = "" then WarningErrMsg = "
All fields are required." end if 'If error message was not set, then all error checks were passed; Connect to the database if WarningErrMsg = "" then ' Create a recordset object to store specific table information Set objRS = Server.CreateObject("ADODB.Recordset") 'Establish what records you want selected for the SQL query string SQL = "Select * From Clients where (CustomerEmail = '" + strCustomerEmail + "') AND (CustomerId = '" + strCustomerId + "')" 'Set the recordset object equal to the SQL query string objRS.Open SQL, objADO, 1, 3 'Checks to see if the recordset is empty - record not found. EOF = End Of File. If empty: Login Denied if objRS.EOF then WarningErrMsg = "
Member information not found. ACCESS DENIED!
You must be signup to be able to login." else 'If login is present - set session variables and login. session("CustomerId") = objRS("CustomerId") session("CustomerEmail") = strCustomerEmail session.Timeout = 120 Response.Redirect "customerstats.asp" end if end if end if %>

ADVERTISER LOGIN

Existing advertisers login here to view your ad statistics.
Not yet an advertiser? Click here to advertise with us.

<% if WarningErrMsg <> "" then %>
Error(s):<%= warningErrMsg %>
<% end if %>
Customer Email:  

Customer Id: