%
If Request("action") <> "" Then
'Check for duplicate email
Set rCheck = Con.Execute("SELECT customer_id FROM customers WHERE email = " & CSQL(Request("email")) & " AND is_visible = 1")
If rCheck.EOF Then 'No duplicate found
'Create customer record in database
SQL = ""
SQL = "INSERT INTO customers(first_name,last_name,company,address,address2,city,state,zip,country,phone," & _
"fax,email,password) VALUES(" & _
CSQL(Request("first_name")) & "," & _
CSQL(Request("last_name")) & "," & _
CSQL(Request("company")) & "," & _
CSQL(Request("address")) & "," & _
CSQL(Request("address2")) & "," & _
CSQL(Request("city")) & "," & _
CSQL(Request("state")) & "," & _
CSQL(Request("zip")) & "," & _
CSQL(Request("country")) & "," & _
CSQL(Request("phone")) & "," & _
CSQL(Request("fax")) & "," & _
CSQL(Request("email")) & "," & _
CSQL(Request("password")) & ")"
Con.Execute(SQL): SQL = ""
'Email customer login information
Set Mail = Server.CreateObject("Persits.MailSender")
Mail.From = "DoNotReply@ACLUS.com"
Mail.Host = "visualedgedesign.com"
Mail.Subject = "Your ACLUS.com Login Information."
Mail.AddAddress Request("email")
strBody = "This is your login information from ACLUS.com." & vbCrLf & vbCrLf
strBody = strBody & "----------------------------------------------------------------------------" & vbCrLf
strBody = strBody & "Email: " & Request("email") & vbCrLf
strBody = strBody & "Password: " & Request("password") & vbCrLf & vbCrLf
strBody = strBody & "Login here -> http://www.aclus.com/login.asp" & vbCrLf
strBody = strBody & "----------------------------------------------------------------------------" & vbCrLf & vbCrLf
strBody = strBody & "Please put this information in a safe place!" & vbCrLf
Mail.Body = strBody
On Error Resume Next ' catch errors
Mail.Send ' send message
If Err.Number <> 0 Then
Response.Write("Error!
" & Err.Description): Response.End()
End If
Mail.Reset
Set Mail = Nothing
'Email notification of registration to ACLUS
Set Mail = Server.CreateObject("Persits.MailSender")
Mail.From = "DoNotReply@ACLUS.com"
Mail.Host = "visualedgedesign.com"
Mail.Subject = "New ACLUS.com Member Registration!"
Mail.AddAddress "michael_flynn@acl.com.au"
strBody = "You have a new ACLUS.com member." & vbCrLf & vbCrLf
strBody = strBody & "----------------------------------------------------------------------------" & vbCrLf
strBody = strBody & "Member Information:" & vbCrLf
strBody = strBody & "First Name: " & Request("first_name") & vbCrLf
strBody = strBody & "Last Name: " & Request("last_name") & vbCrLf
strBody = strBody & "Company: " & Request("company") & vbCrLf
strBody = strBody & "Address: " & Request("address") & vbCrLf
strBody = strBody & "(cont): " & Request("address2") & vbCrLf
strBody = strBody & "City: " & Request("city") & vbCrLf
strBody = strBody & "State/Province: " & Request("state") & vbCrLf
strBody = strBody & "Postal Code: " & Request("zip") & vbCrLf
strBody = strBody & "Country: " & Request("country") & vbCrLf
strBody = strBody & "Phone: " & Request("phone") & vbCrLf
strBody = strBody & "Fax: " & Request("fax") & vbCrLf
strBody = strBody & "Email: " & Request("email") & vbCrLf
strBody = strBody & "----------------------------------------------------------------------------" & vbCrLf & vbCrLf
strBody = strBody & "See more information here:" & vbCrLf
strBody = strBody & "http://www.aclus.com/admin/" & vbCrLf
Mail.Body = strBody
On Error Resume Next ' catch errors
Mail.Send ' send message
If Err.Number <> 0 Then
Response.Write("Error!
" & Err.Description): Response.End()
End If
Mail.Reset
Set Mail = Nothing
'Redirect
Response.Redirect("/thanks.htm")
Else 'Duplicate found
eMsg = "Your email already exists in our customer database.
Please use the "forgot password" function to login."
End If
rCheck.Close: Set rCheck = Nothing
End If
%>