Current viewing of this page can be found at the following address: http://mrmatt.dynali...et/default2.asp
Thanks again!
Form Page:
<!-- #include file="includes/header.asp"--> <p align="center"> <p align="center"><b><font size="4" color="#000000" face="Arial">The Board of Directors for Troop 101’s Alumni Association is interested in your thoughts and ideas. Please take a few minutes and respond to our survey so that we may be able to build a more dynamic organization. </font></b> <p align="center"> <p></p> <form method="POST" action="functions/submitsurvey.asp" onsubmit="return FrontPage_Form1_Validator(this)" language="JavaScript" name="FrontPage_Form1"> <div align="center"> <center> <table border="2" cellpadding="2" style="border-collapse: collapse" bordercolor="#111111" width="392" background="images/wBG.jpg"> <tr> <td width="122"> <p align="center"><font face="Arial" color="#000000">First Name:</font></td> <td width="265"> <p align="center"> <font face="Arial"> <!--webbot bot="Validation" b-value-required="TRUE" i-minimum-length="2" --><input type="text" name="fname" size="36" tabindex="1"></font></td> </tr> <tr> <td width="122"> <p align="center"><font face="Arial" color="#000000">Last Name:</font></td> <td width="265"> <p align="center"> <font face="Arial"> <!--webbot bot="Validation" b-value-required="TRUE" i-minimum-length="3" --><input type="text" name="lname" size="36" tabindex="2"></font></td> </tr> <tr> <td width="122"> <p align="center"><font face="Arial" color="#000000">E-Mail Address:</font></td> <td width="265"> <p align="center"> <font face="Arial"> <!--webbot bot="Validation" b-value-required="TRUE" i-minimum-length="5" --><input type="text" name="email" size="36" tabindex="3"></font></td> </tr> <tr> <td width="122"> <p align="center"><font face="Arial" color="#000000">Street</font></td> <td width="265"> <p align="center"> <font face="Arial"> <input type="text" name="street" size="36" tabindex="4"></font></td> </tr> <tr> <td width="122"> <p align="center"><font face="Arial" color="#000000">City, State & Zip</font></td> <td width="265"> <p align="center"><font face="Arial"> <input type="text" name="city" size="16" tabindex="5"><font color="#000000">, </font> <input type="text" name="state" size="2" tabindex="6" maxlength="2"><font color="#000000"> </font> <input type="text" name="zip" size="7" tabindex="7" maxlength="5"></font></td> </tr> <tr> <td width="122"> <p align="center"><font face="Arial" color="#000000">Phone Number:</font></td> <td width="265"> <p align="center"> <font face="Arial"> <input type="text" name="phone" size="36" tabindex="8"></font></td> </tr> <tr> <td width="122"> <p align="center"><font face="Arial" color="#000000">Cell Phone:</font></td> <td width="265"> <p align="center"> <font face="Arial"> <input type="text" name="cellphone" size="36" tabindex="9"></font></td> </tr> </table> </center> </div> <p align="center" style="margin-top: -1; margin-bottom: -1"> <font size="3" face="Arial" color="#000000"> </font> </p> <div align="center"> <center> <table border="2" cellpadding="2" style="border-collapse: collapse" bordercolor="#111111" width="562" background="images/wBG.jpg"> <tr> <td width="405"><font face="Arial" color="#000000">How often would you say you visit the Troop Website?</font></td> <td width="152" align="center"> <font face="Arial"> <select size="1" name="webAttend" tabindex="10"> <option value="Often">Often</option> <option value="Sometimes ">Sometimes</option> <option value="Rarely">Rarely</option> </select></font></td> </tr> <tr> <td width="405"><font face="Arial" color="#000000">Would you like to receive a newsletter?</font></td> <td width="152" align="center"> <font face="Arial"> <select size="1" name="mailings" tabindex="11"> <option value="Yes" selected>Yes</option> <option value="No">No</option> </select></font></td> </tr> <tr> <td width="405"><font face="Arial" color="#000000">Would you prefer an actual mailing to your house or an electronic version?</font></td> <td width="152" align="center"> <font face="Arial"> <select size="1" name="mailingType" tabindex="12"> <option value="Electronic">Electronic</option> <option value="Postal">Postal</option> </select></font></td> </tr> <tr> <td width="557" colspan="2"><font face="Arial" color="#000000">Would you be willing to help?<br> Our members are spread all over the world today, and in order to make our programs successful people are needed. Please note how you may help:</font></td> </tr> <tr> <td width="557" colspan="2"> <font face="Arial" color="#000000"> <textarea rows="7" name="helpWilling" cols="66" tabindex="13"></textarea></font></td> </tr> </table> </center> </div> <p align="center" style="margin-top: -1; margin-bottom: -1"> </p> <div align="center"> <center> <table border="2" cellpadding="2" style="border-collapse: collapse" bordercolor="#111111" width="562" background="images/wBG.jpg"> <tr> <td colspan="2" width="554"> <p align="center"><font face="Arial" color="#000000">We are considering a list of annual events to bring alumni together. Please indicate those that you think you would attend by checking the box provided. All events would be located in and around the Warren, Ohio area.</font></td> </tr> <tr> <td width="455"><font color="#000000" face="Arial">Family Camp Outing with the troop (June)</font></td> <td width="94"> <p align="center"> <font face="Arial"> <select size="1" name="famCamp" tabindex="14"> <option selected value="Yes">Yes</option> <option value="No">No</option> </select></font></td> </tr> <tr> <td width="455"><font color="#000000" face="Arial">Golf outing (July/ August)</font></td> <td width="94" align="center"> <select size="1" name="golfOuting" tabindex="15"> <option selected value="Yes">Yes</option> <option value="No">No</option> </select></td> </tr> <tr> <td width="455"><font color="#000000" face="Arial">Holiday Party (Between Christmas and New Years)</font></td> <td width="94" align="center"> <select size="1" name="holidayParty" tabindex="16"> <option selected value="Yes">Yes</option> <option value="No">No</option> </select></td> </tr> <tr> <td width="455"><font color="#000000" face="Arial">Reunion event every 5 years</font></td> <td width="94" align="center"> <select size="1" name="reunionFive" tabindex="17"> <option selected value="Yes">Yes</option> <option value="No">No</option> </select></td> </tr> <tr> <td width="455"><font color="#000000" face="Arial">Reunion event every 10 Years</font></td> <td width="94" align="center"> <select size="1" name="reunionTen" tabindex="18"> <option selected value="Yes">Yes</option> <option value="No">No</option> </select></td> </tr> <tr> <td width="549" colspan="2"> <p align="left"><font color="#000000" face="Arial">Other - Please Specify: </font> <font face="Arial"> <input type="text" name="otherEvents" size="57" tabindex="19"></font></td> </tr> </table> </center> </div> <p align="center"><b><font face="Arial" color="#FFFFFF">As we look to network with past members we have also set up this Alumni Directory, Please Specify a Password for this Directory. You will be contacted by Mail when your account has been activated by the Administrator to prevent Spam</font></b></p> <p align="center"><font face="Arial" color="#FFFFFF"><b>Password: <input type="password" name="password" size="20"></b></font></p> <p align="center"><font face="Arial"><input type="submit" value="Submit" name="B1"><font color="#000000"> </font> <input type="reset" value="Reset" name="B2"></font></p></form><!-- #include file="includes/footer.asp"-->Submission Page:
<%'Dimension variablesDim adoCon 'Holds the Database Connection ObjectDim rsAddX 'Holds the recordset for the record to be updatedDim strSQL 'Holds the SQL query for the databaseDim rsAddX2 'Holds the recordset for the record to be updatedDim strSQL2 'Holds the SQL query for the database'Dim User_ID'Create an ADO connection odjectSet adoCon = Server.CreateObject("ADODB.Connection")'Set an active connection to the Connection object using a DSN-less connectionadoCon.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("MYDB.mdb")'Create an ADO recordset objectSet rsAddX = Server.CreateObject("ADODB.Recordset")Set rsAddX2 = Server.CreateObject("ADODB.Recordset")'Initialise the strSQL variable with an SQL statement to query the databasestrSQL = "SELECT users.* FROM users"strSQL2 = "SELECT survey.* FROM survey"'Set the cursor type we are using so we can navigate through the recordsetrsAddX.CursorType = 2'Set the lock type so that the record is locked by ADO when it is updatedrsAddX.LockType = 3'Open the recordset with the SQL query rsAddX.Open strSQL, adoCon'Add New line to the table for the record in UsersrsAddX.AddNew'add to the recordrsAddX.Fields("fname") = Request.Form("fname")rsAddX.Fields("lname") = Request.Form("lname")rsAddX.Fields("email") = Request.Form("email")rsAddX.Fields("phone") = Request.Form("phone")rsAddX.Fields("cellphone") = Request.Form("cellphone")rsAddX.Fields("street") = Request.Form("street")rsAddX.Fields("state") = Request.Form("state")rsAddX.Fields("city") = Request.Form("city")rsAddX.Fields("zip") = Request.Form("zip")rsAddX.Fields("password") = Request.Form("password")rsAddX.Fields("auth") = "inactive"rsAddX.Fields("mailings") = Request.Form("mailings")'User_ID = rsAddX("userid")'Physically write in the recordrsAddX2.CursorType = 2rsAddX2.LockType = 3rsAddX2.Open strSQL2, adoCon'Add New line to the table for the record in UsersrsAddX2.AddNew'add to the recordrsAddX2.Fields("webAttend") = Request.Form("webAttend")rsAddX2.Fields("mailingType") = Request.Form("mailingType")rsAddX2.Fields("helpWilling") = Request.Form("helpWilling")rsAddX2.Fields("famCamp") = Request.Form("famCamp")rsAddX2.Fields("golfOuting") = Request.Form("golfOuting")rsAddX2.Fields("holidayParty") = Request.Form("holidayParty")rsAddX2.Fields("reunionFive") = Request.Form("reunionFive")rsAddX2.Fields("reunionTen") = Request.Form("reunionTen")rsAddX2.Fields("otherEvents") = Request.Form("otherEvents")'rsAddX2.Fields("userid") = User_ID'Physically write in the recordrsAddX2.UpdatersAddX.CloseSet rsAddX = NothingrsAddX2.CloseSet rsAddX2 = NothingSet adoCon = Nothing'Return to the List of ItemsResponse.Redirect "../thanks.asp"%>