%@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
|
<% 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 %>
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)%>