<%@LANGUAGE="VBSCRIPT"%> <% '------------------------------------------------------------------------------------------ ' We want to make sure the form is actually submitted before the code executes, otherwise ' it would execute every time the page loads and send a blank email :o) '------------------------------------------------------------------------------------------ If Request("fldSubmit") <> "" Then strDate = Day(Date) & "-" & MonthName(Month(Date),true) & "-" & Year(Date) strEmailAddress = Request("fldEmail") strName = Request("fldName") strMessage = Request("fldMessage") strNumber = Request("fldNumber") If Not strNumber = "231" Then varError = varError & "* Please enter the security check number as it appears below
" End If If Not strName <> "" Then varError = varError & "* Please enter your name
" End If If Not strMessage <> "" Then varError = varError & "* Please enter your message
" End If If Not varError <> "" Then Dim strSQL Dim objConn Set objConn = Server.CreateObject("ADODB.Connection") objConn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=C:\sites\tld\troop231.org\public_html\memorial\dibdibdib.mdb;" objConn.Open strSQL = "INSERT INTO memorial ( fldDate, fldEmail, fldName, fldMessage) VALUES ( '" & strDate & "', '" & Replace(strEmailAddress,"'","''") & "', '" & Replace(strName,"'","''") & "', '" & Replace(strMessage,"'","''") & "' )" objConn.Execute strSQL objConn.Close Set objConn = Nothing varDone = True End If End If %> Troop231.org - Boy Scouts of America

Home Page
Register Your Details
Photo Gallery




<% If varError <> "" Then %>
There are some problems with the details you submitted, please correct the following and resubmit the form:
<%=varError%>
<% End If %> <% If Not varDone <> "" Then %>
Fondest Scouting Memory

Please use the form below to add your memory to the memorial page.

Your Name:

(required)


Your Email Address:

(optional, your email address will not be displayed)

Your comments:

(required)

Security Check:
Please enter the number in the box below:

Eagle
(required)


This website was created by Troop231 Scouts.
<% End If %> <% If varDone <> "" Then %>
Thank you very much for commenting, your words are now visible on the memorial page.

« return to the memorial page




This website was created by Troop231 Scouts.
<% End If %>

Contact the Webmaster
The Boy Scout logo is copyright © Boy Scouts of America
This website is copyright © <%=Year(Date)%>