<% Sub Display() %> Christians In Action International Network - About Us

 

Get A Referral

Need a product or service, but can't locate anyone in the directory who can assist? Simply fill out the form below and let our members help! With access to hundreds of Christian owned businesses, you'll be getting the service or product you need quickly from someone you can trust! Best of all, it's FREE!

Title:
Description:
Contact:
Phone:
Email:

BACK

 

 

<% End Sub Sub SaveReferral() Dim strSQL Dim cnSQL Dim strEmail strEmail = Request("txtEmail") & "" Set cnSQL = Server.CreateObject("adodb.connection") cnSQL.Open "Provider=SQLOLEDB.1;Password=christian;Persist Security Info=True;User ID=CTS_Login;Initial Catalog=CTS;Data Source=65.45.178.38" strSQL = "INSERT INTO Referrals (Title, Description, Contact, Phone, Email) VALUES ('" & Modify_Text(Request("txtTitle")) & "', '" & Modify_Text(Request("txtDescription")) & "', '" & Modify_Text(Request("txtContact")) & "', '" & Modify_Text(Request("txtPhone")) & "', '" & strEmail & "')" cnSQL.Execute strSQL Set cnSQL = NOTHING 'Send and Email Here Response.Redirect ("thankyou.html") Set rsMember = Nothing End Sub Function Modify_Text(strModify) 'Function I use commonly to double up quotation marks 'in data passes to SQL Server Dim strHolder Dim intCounter Dim strChecked For intCounter = 1 To Len(strModify) strHolder = Mid(strModify, intCounter, 1) 'if the character equals a double quote If strHolder = Chr(34) Then strHolder = """" 'if the character equals a single quote ElseIf strHolder = Chr(39) Then strHolder = "''" End If strChecked = strChecked + strHolder Next Modify_Text = strChecked End Function Sub Main If Request.QueryString("action") = "save" Then Call SaveReferral Else Call Display End If End Sub Call Main %>