<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> <% Dim MM_editAction MM_editAction = CStr(Request.ServerVariables("SCRIPT_NAME")) If (Request.QueryString <> "") Then MM_editAction = MM_editAction & "?" & Server.HTMLEncode(Request.QueryString) End If ' boolean to abort record edit Dim MM_abortEdit MM_abortEdit = false %> <% ' IIf implementation Function MM_IIf(condition, ifTrue, ifFalse) If condition = "" Then MM_IIf = ifFalse Else MM_IIf = ifTrue End If End Function %> <% If (CStr(Request("MM_insert")) = "form1") Then If (Not MM_abortEdit) Then ' execute the insert Dim MM_editCmd Set MM_editCmd = Server.CreateObject ("ADODB.Command") MM_editCmd.ActiveConnection = MM_connCZOODB_STRING MM_editCmd.CommandText = "INSERT INTO dbo.tblJNetVisitors (Forenames, Surname, Country, CustomerEmail, OptIn, RecordSource, Active) VALUES (?, ?, ?, ?, ?, ?, ?)" MM_editCmd.Prepared = true MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param1", 201, 1, 100, Request.Form("Forenames")) ' adLongVarChar MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param2", 201, 1, 100, Request.Form("Surname")) ' adLongVarChar MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param3", 201, 1, 100, Request.Form("Country")) ' adLongVarChar MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param4", 201, 1, 100, Request.Form("CustomerEmail")) ' adLongVarChar MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param5", 5, 1, -1, MM_IIF(Request.Form("OptIn"), Request.Form("OptIn"), null)) ' adDouble MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param6", 201, 1, 50, Request.Form("RecordSource")) ' adLongVarChar MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param7", 5, 1, -1, MM_IIF(Request.Form("Active"), Request.Form("Active"), null)) ' adDouble MM_editCmd.Execute MM_editCmd.ActiveConnection.Close ' append the query string to the redirect URL Dim MM_editRedirectUrl MM_editRedirectUrl = "thankyou.htm" If (Request.QueryString <> "") Then If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0) Then MM_editRedirectUrl = MM_editRedirectUrl & "?" & Request.QueryString Else MM_editRedirectUrl = MM_editRedirectUrl & "&" & Request.QueryString End If End If Response.Redirect(MM_editRedirectUrl) End If End If %> <% Dim rsTitles Dim rsTitles_cmd Dim rsTitles_numRows Set rsTitles_cmd = Server.CreateObject ("ADODB.Command") rsTitles_cmd.ActiveConnection = MM_connCZOODB_STRING rsTitles_cmd.CommandText = "SELECT * FROM dbo.tblVisitorTitles" rsTitles_cmd.Prepared = true Set rsTitles = rsTitles_cmd.Execute rsTitles_numRows = 0 %> Jaguar Conservation Network

Home
Topics
Projects
Bibliography
Forum
News
Collaborators
Contact Us

Additions & Corrections
If you would like us to add an item to the Jaguar Conservation Network, or to make corrections to the information already included then please email us.

Suggestions
Similarly, if you have any suggestions about how we could make the Jaguar Conservation Network more useful, please email us.

Updates
To receive updates from Jaguar Conservation Network please complete the form below.

First Name:
Last Name:
Country:
Email:
 
To unsubscribe fom Jaguar Conservation Network Updates please email us.
(Please put 'Unsubscribe' in the subject header of your email, and provide your name and email address)
© 2007-2008 Chester Zoo. Registered Charity No. 306077
Created & maintained by Chloe Inskip & Alexandra Zimmermann. Last Updated: 28.08.2008
Chester Zoo is not responsible for the content of external websites.
<% rsTitles.Close() Set rsTitles = Nothing %>