if request("Clear")="1" then session("r_Name")="" session("r_Address")="" session("r_City")="" session("r_State")="" session("r_Zip")="" session("r_Email")="" session("r_Phone")="" Response.Cookies("APP")("CustomerID")="" end if 'if no name (form not yet filled out) and they're registered&remembered, pre-popultate form if session("r_name")<>"" then bRegistered=true if session("Order_Name")="" or isnull(session("Order_Name")) then session("Order_name")=session("r_Name") if session("Order_address")="" or isnull(session("Order_address")) then session("Order_address")=session("r_Address") if session("Order_city")="" or isnull(session("Order_city")) then session("Order_city")=session("r_City") if session("Order_state")="" or isnull(session("Order_state")) then session("Order_state")=session("r_State") if session("Order_zip")="" or isnull(session("Order_zip")) then session("Order_zip")=session("r_Zip") if session("Order_email")="" or isnull(session("Order_email")) then session("Order_email")=session("r_Email") if session("Order_phone")="" or isnull(session("Order_phone")) then session("Order_phone")=session("r_Phone") end if if Request.Form.Count>0 then 'dump data to session vars for each sElement in Request.Form session("Order_" & sElement)=replace(request(sElement),"'","`") next 'validate bValidate=false if CheckEmpty("Name") and CheckEmpty("Address")and CheckEmpty("City") and CheckEmpty("State") and CheckEmpty("Zip") and CheckEmpty("Phone") and CheckEmpty("Email") and CheckEmpty("cctype") and CheckEmpty("ccnum") and CheckEmpty("ccexpm") and CheckEmpty("ccexpy") and CheckEmpty("ccname") then bValidate=true else bValidate=false sMessage="Please fill out all fields marked with an asterisk(*)." end if 'check email if bValidate then bValidate=ValidEmail(request("Email")) if not bValidate then sMessage = "The email address provided appears to be invalid. Please check." end if if isempty(session("Cart")) then bValidate=false sMessage "Your shopping cart is empty. This may be the result of an expired session" end if 'phone formatting sPhone=session("order_Phone") if len(sPhone)=10 then sPhone= "(" & left(sPhone,3) & ") " & mid(sPhone,4,3) & "-" & mid(sPhone,7) Response.Write "phone:" & sPhone & "
" if bValidate then 'redirect to confirmation page Response.Redirect "CartConfirm.asp" Response.End end if end if function CheckEmpty(sElement) if trim(Request(sElement)) = "" then CheckEmpty=false else CheckEmpty=true end if end function %>
![]() |
|
| Parts Request / Contact Us FAQ Links | |
|
|
|
|
Have you registered? Being registered makes you eligable for special discounts! To register, click here. If you've already registered with us, log in.