I'm fairly new to Cold Fusion and have a question about using CFLoop and forms. I'm not sure how to build the code for the update.
I have an "approval" form - where I'll list documents, and a manager will decide when a document is approved or ready to be deleted from the system. If a checkbox is not selected, the document will remain on the list until the next approval process takes place (not every document will have a checkbox selected): <CFQUERY name="doc_list" DATASOURCE="mydsn"> select doc_id, title from documents where approved = 'no' </CFQUERY> <FORM METHOD="POST" ACTION="approval.cfm"> <TABLE border="1"> <TR><TH>Title</TH> <TH>Approved</TH> <TH>Delete</TH> </TR> <!--- define the list ---> <CFLOOP index="doc_id" list="#ValueList(doc_list.doc_id)#"> <CFOUTPUT query = "doc_list" startrow="1" endRow="doc_list.RecordCount"> <TR> <TD>#title#</TD> <TD><INPUT type="checkbox" name="approved" value="approved"></TD> <TD><INPUT type="checkbox" name="delete" value="delete"></TD> </TR> </CFOUTPUT> </CFLOOP> </TABLE> <INPUT type="submit" value="Submit"> </FORM> So, the question is, how do I code the "approval.cfm" so that it loops through the records. If approved is selected, the database is updated to indicate 'yes', if delete is selected, the record is deleted. If nothing is selected, the record remains the same. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm

