Are you trying to loop the list for the insert?

I would guess you need to use the List commands.

<cfloop index="i" from="1" to="#listlen('FORM.Answer', ',')#">
        Do your insert...
</cfloop>

>From Live Docs:
http://livedocs.adobe.com/coldfusion/6.1/htmldocs/functi13.htm#wp1099435

- Nick

-----Original Message-----
From: Gary Strommen [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 30, 2007 9:53 PM
To: CF-Newbie
Subject: Comma Separated Lists


I have a form where the user can select multiple checkboxes and the
selections are stored in one comma separated list.  How do I separate those
values on the next page?

Page 1:
<input type="checkbox" name="Answer" value="A">Option A<br>
<input type="checkbox" name="Answer" value="B">Option B<br>
<input type="checkbox" name="Answer" value="C">Option C<br>
<input type="checkbox" name="Answer" value="D">None of the above

Page 2:  (Option A and Option B were selected)

FORM.Answer = A,B

I want to insert these answers into a database table.  Any ideas on where to
go from here?

Thanks in advance!




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Check out the new features and enhancements in the
latest product release - download the "What's New PDF" now
http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf

Archive: 
http://www.houseoffusion.com/groups/CF-Newbie/message.cfm/messageid:3017
Subscription: http://www.houseoffusion.com/groups/CF-Newbie/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15

Reply via email to