Hi,
I am struggling to work out how to grab and contain array values in variables so that they can be used to form an email enquiry. I am knew to checkbox processing and asp arrays in general!
This is my code so far, and it outputs the array values to screen, but I need to put these values into variables somehow so that I can email them out as separate items.
Any help appreciated!
I am struggling to work out how to grab and contain array values in variables so that they can be used to form an email enquiry. I am knew to checkbox processing and asp arrays in general!
This is my code so far, and it outputs the array values to screen, but I need to put these values into variables somehow so that I can email them out as separate items.
Any help appreciated!
Code:
<%
'Variables for Personal Details
Dim Name
Dim Date
Dim Venue
'Variables for email particulars
Dim sMsg
Dim sTo
Dim sFrom
Dim sSubject
Dim sTextBody
Name = request.form("audio_name")
Date = request.form("audio_date")
venue = request.form("audio_venue")
'Variables for checkboxes array
Dim mode,mode_a,i
'Used audio as common name for all the checkboxes with different values so they will be treated as a group of checkboxes
mode = request.form("audio")
'Split the string to get the array of checked values.
mode_a=split(mode,",")
'Loop through the array by using for for loop and UBound function to print out the checked values of the checkboxes.
'LBound and UBound determine the min and max length of the array, useful for looping.
For i=LBound(mode_a) to UBound(mode_a)
Response.Write mode_a(i) + "<br>"
Next
'sTo = "somewhere@somewhere.com"
'sFrom = "somewhere@somewhere.com"
'sSubject = "Enquiry"
'sTextBody = "An enquiry was made by " & Name & " on " & Date & " for " & Venue
'Dim objMail
'Create the mail object
'Set objMail = Server.CreateObject("CDO.Message")
'Set key properties
'objMail.From = sFrom
'objMail.To = sTo
'objMail.Subject= sSubject
'objMail.TextBody = sTextBody
'Send the email
'objMail.Send
'Clean-up mail object
'Set objMail = Nothing
%>