|
|
|
Syndicated News Feature Survey
| |
<% If Request.ServerVariables("Request_Method") = "POST" Then
Function SQLSafe (instring)
dim outstring
For x = 1 to Len(instring)
if Mid(instring, x, 1) = "'" Then
outstring = outstring & "''"
Else
outstring = outstring & Mid(instring, x, 1)
End If
Next
SQLSafe = outstring
End Function
Response.Write("Thank you for taking the time to submit this survey.")
strQ1 = SQLSafe(Request.Form("q1"))
strQ2 = SQLSafe(Request.Form("q2"))
strQ3 = SQLSafe(Request.Form("q3"))
strQ4 = SQLSafe(Request.Form("q4"))
strQ5 = SQLSafe(Request.Form("q5"))
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open Application("ConnectionString")
strSQL = "INSERT INTO news_survey (q1, q2, q3, q4, q5) VALUES ( '" & strQ1 & "','" & strQ2 & "','" & strQ3 & "','" & strQ4 & "','" & strQ5 & "') "
Conn.Execute(strSQL)
'send email to Debbie
Set Mailer = Server.CreateObject("SMTPsvg.Mailer")
Mailer.FromName = "SOT Admin"
Mailer.FromAddress = "sothq@toxicology.org"
Mailer.RemoteHost = "10.11.0.2"
Mailer.AddRecipient "Debbie O'Keefe", "debbie@toxicology.org"
'Mailer.AddBcc "SendMail.asp", "trevor@hurldesigns.com"
Mailer.ReturnReceipt = false
Mailer.ConfirmRead = false
Mailer.Subject = "SOT Syndicated News Feature Survey Submission"
strBody = "A new submission has been made on the SOT Syndicated News Feature Survey. Results are below:" & chr(13) & chr(10) & chr(13) & chr(10)
strBody = strBody & "1. Did you find this Syndicated News Feature section of the SOT web site useful?" & chr(10) & strQ1 & chr(13) & chr(10) & chr(13) & chr(10)
strBody = strBody & "2. Do you feel the news presented in this feed is balanced?" & chr(10) & strQ2 & chr(13) & chr(10) & chr(13) & chr(10)
strBody = strBody & "3. Do you feel more subject options need to be available?" & chr(10) & strQ3 & chr(13) & chr(10) & chr(13) & chr(10)
strBody = strBody & "4. How can this section be improved?" & chr(10) & strQ4 & chr(13) & chr(10) & chr(13) & chr(10)
strBody = strBody & "5. Do you have any relevant scientifically credible Syndicated News Feature sites to add? " & chr(10) & strQ5 & chr(13) & chr(10) & chr(13) & chr(10)
Mailer.BodyText = strBody
Mailer.SendMail
Set Mailer = nothing
Else %>
<% End If %>
|
|
|