<% Response.Expires = -1 %> <% Dim strFirstLetter,strLetterCase Dim strCartId strCartId = Request("CartId") Dim strPWD1 strPWD1 = trim(Request.Form("PWD1")) Session("CustPWD") = strPWD1 Dim strPWD2 strPWD2 = trim(Request.Form("PWD2")) Dim strFName strFName = trim(Request("FName")) strFName = Replace(strFName,Chr(034),"") strFirstLetter = Left(strFName,1) strLetterCase = Ucase (strFirstLetter) strFName = Replace(strFName,strFirstLetter,strLetterCase,1,1) Dim strMName strMName = trim(Request.Form("MName")) strMName = Replace(strMName,Chr(034),"") strFirstLetter = Left(strMName,1) strLetterCase = Ucase (strFirstLetter) strMName = Replace(strMName,strFirstLetter,strLetterCase,1,1) Dim strLName strLName = trim(Request.Form("LName")) strLName = Replace(strLName,Chr(034),"") strFirstLetter = Left(strLName,1) strLetterCase = Ucase (strFirstLetter) strLName = Replace(strLName,strFirstLetter,strLetterCase,1,1) Dim strCoName strCoName = trim(Request.Form("CoName")) strCoName = Replace(strCoName,Chr(034),"") strCoName = UCase(strCoName) Dim strEmail strEmail = trim(Request.Form("Email")) Session("CustEmail") = strEmail Dim strActive strActive = "Yes" Dim strAddress strAddress = trim(Request.Form("Address")) strAddress = Replace(strAddress,Chr(034),"") strAddress = UCase(strAddress) Dim strAddress2 strAddress2 = trim(Request.Form("Address2")) strAddress2 = Replace(strAddress2,Chr(034),"") strAddress2 = UCase(strAddress2) Dim strCity strCity = trim(Request.Form("City")) strCity = Replace(strCity,Chr(034),"") strCity = UCase(strCity) Dim strState strState = Request.Form("State") Dim strZipCode strZipCode = trim(Request.Form("ZipCode")) Dim strCountryCode Dim strCountry Dim strArrayVal strArrayVal = split(Request.Form("Country"), ":", -1) strCountryCode = strArrayVal(0) strCountry = strArrayVal(1) If (strCountryCode <> "US" And Request("State") <> "OutsideUSA") Then Response.Redirect "error.asp?Error=

You selected " & strCountry & " as your Country. Please choose Outside USA from the State drop down box." & _ "

Please use the back button to return." Response.End ElseIf (strCountryCode = "US" And Request("State") = "OutsideUSA") Then Response.Redirect "error.asp?Error=

You selected " & strCountry & " as your Country. Please choose a State from the State drop down box." & _ "

Please use the back button to return." Response.End End If Dim strAreaCode strAreaCode = trim(Request.Form("AreaCode")) Dim strPhoneEx strPhoneEx = trim(Request.Form("PhoneEx")) Dim strPhoneNum strPhoneNum = trim(Request.Form("PhoneNum")) Dim strAreaCode2 strAreaCode2 = trim(Request("AreaCode2")) Dim strPhoneEx2 strPhoneEx2 = trim(Request.Form("PhoneEx2")) Dim strPhoneNum2 strPhoneNum2 = trim(Request.Form("PhoneNum2")) Dim strInternationalPhone strInternationalPhone = trim(Request.Form("InternationalPhone")) If strFName = "" Then Response.Redirect "error.asp?Error=You must enter your first name as it appears on your credit card." &_ "

Use the Back Button below." Elseif Request("LName") = "" Then Response.Redirect "error.asp?Error=You must enter your last name as it appears on your credit card." &_ "

Use the Back Button below." Elseif Request("Email") = "" Then Response.Redirect "error.asp?Error=You must enter your email address." &_ "

Use the Back Button below." End If If inStr(strEmail, "@") Then Else Response.Redirect "error.asp?Error=The email address used does not appear to be valid.

" &_ "Please go back and check your email address.

" &_ "An example email is name@domain.com. There must be an @ sign and no www." End If If inStr(strEmail, "www") Then Response.Redirect "error.asp?Error=The email address used does not appear to be valid.

" &_ "Please go back and check your email address.

" &_ "An example email is name@domain.com. There must be an @ sign and no www." ElseIf strAddress = "" Then Response.Redirect "error.asp?Error=You must enter your street address." &_ "

Use the Back Button below." Elseif strCity = "" Then Response.Redirect "error.asp?Error=You must enter your city, town or province." &_ "

Use the Back Button below." Elseif strState = "Select State" Then Response.Redirect "error.asp?Error=You must enter your state or choose Outside USA." &_ "

Use the Back Button below." If (strState = "OutsideUSA" And strProvince = "") Then Response.Redirect "error.asp?Error=You must enter either a US State or choose Ouside USA and enter your State or Province." &_ "

Use the Back Button below." End If Elseif strZipCode = "" Then Response.Redirect "error.asp?Error=You must enter your postal code." &_ "

Use the Back Button below." End If If Len(strPWD1) < 6 Then Response.Redirect "error.asp?Error=Your password must be 6 or more characters long." &_ "

Use the Back Button below." End If If strPWD1 = strPWD2 Then Else Response.Redirect "error.asp?Error=The Passwords that you entered do not match." &_ "

Use the back button to try again." Response.End END IF DIM mySQL, objRS1 mySQL = "SELECT * FROM Customers Where Email='"& strEmail &"'" Set objRS1 = Server.CreateObject("ADODB.Recordset") objRS1.Open mySQL, objConn IF objRS1.EOF THEN DIM objRS Set objRS = Server.CreateObject("ADODB.Recordset") objRS.Open "Customers", objConn, 1, 3 objRS.AddNew objRS("FName") = strFName objRS("MName") = strMName objRS("LName") = strLName objRS("CoName") = strCoName objRS("Email") = strEmail objRS("Active") = "Yes" objRS("Address") = strAddress objRS("Address2") = strAddress2 objRS("City") = strCity objRS("State") = strState objRS("ZipCode") = strZipCode objRS("Country") = strCountry objRS("CountryCode") = strCountryCode objRS("AreaCode") = strAreaCode objRS("PhoneEx") = strPhoneEx objRS("PhoneNum") = strPhoneNum objRS("AreaCode2") = strAreaCode2 objRS("PhoneEx2") = strPhoneEx2 objRS("PhoneNum2") = strPhoneNum2 objRS("InternationalPhone") = strInternationalPhone objRS("PWD") = strPWD1 objRS.Update ELSE Response.Redirect "error.asp?Error=

" & strFName & ",

" &_ strEmail & " alreay exists in an account." &_ "

Click Here if you forgot your password." &_ "

Use the back button to return to the create account page." Response.End END IF %> Create Customer Account Verify text="#<%= strText %>" link="#<%= strLink %>" vlink="#<%= strVLink %>" alink="#<%= strALink %>">

<%= strFName %>, please verify your account information.

Click "Continue to Place Order" or click "Make Corrections" below.

First Name: <%= strFName %>
Middle Name: <%= strMName %>
Last Name: <%= strLName %>
Company Name: <%= strCoName %>
Email Address: <%= strEmail %>
Address: <%= strAddress %>
Address 2: <%= strAddress2 %>
City/Town/Province: <%= strCity %>
State: <%= strState %>
Postal Code: <%= strZipCode %>
Country: <%= strCountry %>
Phone: <%= strAreaCode %>-<%= strPhoneEx %>-<%= strPhoneNum%>
Phone 2: <%= strAreaCode2 %>-<%= strPhoneEx2 %>-<%= strPhoneNum2 %>
International Phone: <%= strInternationalPhone %>
Password: <%= strPWD1 %>