% Option Explicit %> <% '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' ' Registration Application ' Title and Description displayed on this page, are first pulled from database. ' Uses the FormCapture robot to send results via email as well as recording data to datbase. ' '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' If Request.ServerVariables("REQUEST_METHOD") = "POST" Then ' NOTE --- FAIL THE FORM if the WeddingDate submitted is NOT a valid DateTime type! Dim theDate : theDate = Request.Form("RegWeddingDate") ' grab from from Dim blnDate : blnDate = True ' initially optimistic If Not IsDate(theDate) Then blnDate = False Else 'ok, it IS a date, but is it an acutal DATE and not just a TIME? check the YEAR... Dim mStr, dStr, yStr mStr = month(CDate(theDate)) ' : debug "mStr is '" & mStr & "'" dStr = day(CDate(theDate)) ' : debug "dStr is '" & dStr & "'" yStr = year(CDate(theDate)) ' : debug "yStr is '" & yStr & "'" If yStr < year(CDate(now())) Then blnDate = False ' this catches when just a time was entered... End If End If If NOT blnDate Then Response.Redirect "error.asp?error=" & Server.URLEncode("