<% Const DATE_DELIMITER = "'" %> United Contact (1985) Inc. :: Inquiry
<% If Request.Form("action") <> "Save Form Data" Then ' Show the form %>
" method="post" name="inquiry" id="inquiry" onSubmit="YY_checkform('inquiry','iqname','#q','0','Please enter your name','iqcompany','#q','0','Please enter the company name','iqtel','#q','0','Please enter the telephone number','iqfax','#q','0','Please enter the fax number','iqemail','#S','2','Please enter a valid email address');return document.MM_returnValue">

NEED SOME HELP, OR NEED A QUOTE??? ASK OUR TECH. SERVICES

Please provide the following information,
our customer representative will contact you shortly.
Name:
Company:
Street:
City:
State:
Zip Code:
Country:
Telephone:
Fax:
Email:
How did you hear about us?
 

 

 

<% Else strName = replace(trim(Request.Form("iqname")),"'", "''") strCompany = replace(trim(Request.Form("iqcompany")),"'", "''") strStreet = replace(trim(Request.Form("iqstreet")),"'", "''") strCity = replace(trim(Request.Form("iqCity")),"'", "''") strState = replace(trim(Request.Form("iqstate")),"'", "''") strCountry = replace(trim(Request.Form("iqcountry")),"'", "''") strZip = replace(trim(Request.Form("iqzip")),"'", "''") strTel = replace(trim(Request.Form("iqtel")),"'", "''") strFax = replace(trim(Request.Form("iqfax")),"'", "''") strEmail = replace(trim(Request.Form("iqemail")),"'", "''") strHear = replace(trim(Request.Form("iqhear")),"'", "''") strMsg = replace(trim(Request.Form("iqmsg")),"'", "''") On Error Resume Next strErrorMsg = "" If Len(strName) = 0 Or Len(strName) > 20 Then ErrFld= "Name" Err.Raise 1 End If If Len(strCompany) = 0 Or Len(strCompany) > 50 Then ErrFld= "Company" Err.Raise 1 End If If Len(strTel) = 0 Or Len(strTel) > 20 Then ErrFld="Telephone" Err.Raise 1 End If If Len(strFax) = 0 Or Len(strFax) > 20 Then ErrFld="Fax" Err.Raise 1 End If If strEmail = "" Or Not IsValidEmail(strEmail) Then ErrFld="Email" Err.Raise 1 End If If Err.number <> 0 Then strErrorMsg = strErrorMsg & "

Your entry for " & ErrFld & " field is " & _ "inappropriate! " & _ "Try again

" &vbCrLf Err.Clear End If On Error Goto 0 If strErrorMsg <> "" Then ' Show the error message that got us here! Response.Write strErrorMsg Else ' Open connection to the DB Set cnnFormToDB = Server.CreateObject("ADODB.Connection") cnnFormToDB.Open conn ' Build our SQL String strSQL = "" strSQL = strSQL & "INSERT INTO Inquiry " strSQL = strSQL & "(Name,Company,Street,City,State,pCode,Country,phone,fax,Email,addDate,knoway,message) " & vbCrLf strSQL = strSQL & "VALUES (" strSQL = strSQL & "'" & strName & "'" strSQL = strSQL & ", " strSQL = strSQL & "'" & strCompany & "'" strSQL = strSQL & ", " strSQL = strSQL & "'" & strStreet & "'" strSQL = strSQL & ", " strSQL = strSQL & "'" & strCity & "'" strSQL = strSQL & ", " strSQL = strSQL & "'" & strState & "'" strSQL = strSQL & ", " strSQL = strSQL & "'" & strZip & "'" strSQL = strSQL & ", " strSQL = strSQL & "'" & strCountry & "'" strSQL = strSQL & ", " strSQL = strSQL & "'" & strTel & "'" strSQL = strSQL & ", " strSQL = strSQL & "'" & strFax & "'" strSQL = strSQL & ", " strSQL = strSQL & "'" & strEmail & "'" strSQL = strSQL & ", " strSQL = strSQL & DATE_DELIMITER & Now & "'" strSQL = strSQL & ", " strSQL = strSQL & "'" & strHear & "'" strSQL = strSQL & ", " strSQL = strSQL & "'" & strMsg & "'" strSQL = strSQL & ");" cnnFormToDB.Execute strSQL, adCmdText Or adExecuteNoRecords ' Dispose of the CONN object cnnFormToDB.Close Set cnnFormToDB = Nothing %>

Thanks for submitting your information to us!

Our customer representative will contact you shortly.

<% '========web mail procedure======= Dim strTo, strSubject, strBody 'Strings for recipient, subject, boby Dim objCDOMail 'The CDO object strTo = Request.Form("iqemail") strSubject = "Quick reply to customer inquiry" strBody="Dear " & strName & "," strBody = strBody & vbCrLf & vbCrLf strBody=strBody & "Thank you for inquiry about our business, our support team will contact you shortly." strBody = strBody & vbCrLf & vbCrLf strBody = strBody & "unitedcontact.com" strBody = strBody & vbCrLf & vbCrLf strBody = strBody & "Following text is what you entered in our inquiry form for the referenece to our customer representative." strBody = strBody & vbCrLf & vbCrLf strBody= strBody & "Name: " & strName & vbCrLf strBody= strBody & "Company: " & strCompany & vbCrLf strBody= strBody & "Street: " & strStreet & vbCrLf strBody= strBody & "City: " & strCity & vbCrLf strBody= strBody & "State: " & strState & vbCrLf strBody= strBody & "Postal Code: " & strZip & vbCrLf strBody= strBody & "Country: " & strCountry & vbCrLf strBody= strBody & "Telephone: " & strTel & vbCrLf strBody= strBody & "Fax: " & strFax & vbCrLf strBody= strBody & "Email: " & strEmail & vbCrLf strBody= strBody & "How did you hear about us?: " & strHear & vbCrLf strBody= strBody & "Message: " & strMsg & vbCrLf Set objCDOMail = Server.CreateObject("CDONTS.NewMail") objCDOMail.From = "info@unitedcontact.com" objCDOMail.To = strTo objCDOMail.Subject = strSubject objCDOMail.Body = strBody objCDOMail.Cc = "info@unitedcontact.com" objCDOMail.Send Set objCDOMail = Nothing 'Response.Write "
The quick reply message was sent to " & strTo & "!
" End If %> <% ' Only functions and subs follow! Function IsValidEmail(strEmail) Dim bIsValid bIsValid = True If Len(strEmail) < 5 Then bIsValid = False Else If Instr(1, strEmail, " ") <> 0 Then bIsValid = False Else If InStr(1, strEmail, "@", 1) < 2 Then bIsValid = False Else If InStrRev(strEmail, ".") < InStr(1, strEmail, "@", 1) + 2 Then bIsValid = False End If End If End If End If IsValidEmail = bIsValid End Function %> <% end if %>