<% dim conn 'database connection object dim rs 'recordset dim strSQL 'sql query dim endline 'set endline endline = chr(10) 'create the connection object set conn = Server.CreateObject("ADODB.Connection") 'open the connection conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=d:\home\hnt7c211\legacy\f7e8af3jk23sd3.mdb;" 'create a recordset set rs = Server.CreateObject("ADODB.Recordset") if Request.ServerVariables("REQUEST_METHOD") = "POST" then 'save this guestbook entry to the database strSQL = "SELECT * FROM Guestbook" 'set rs properties rs.CursorType = adOpenDynamic 'to move dynamically through rs rs.LockType = adLockOptimistic 'to lock the recordset while updating 'run the query rs.Open strSQL, conn 'add a new record rs.AddNew 'now add the fields rs.Fields("Name") = Request.Form("Name") rs.Fields("Location") = Request.Form("Location") rs.Fields("Date") = Formatdatetime( now(), 1 ) rs.Fields("Entry") = Request.Form("Comments") 'write to the database rs.Update rs.Close 'set redirect string to ok Session("responseString") = "Your entry has been saved to the guestbook.

" &_ "View the guestbook" 'redirect to form_submit Response.Redirect "form_submit.asp" end if %> Legacy Cruise II
<%=welcomeString%>

Legacy Cruise II departs in

Sign the guestbook

You may view the guestbook, or if you'd like to send us a personal message, please use the feedback form.

Name:
City, State:
Comments:
 

Note: this information will be publicly viewable.