I have a series of form variables which can be submitted from the previous page. If the user clicked the delete option for photograph number 1, I will have delete_pic1. The user may have checked that they wanted to delete several photos or no photos. The following code does not work. It won't allow me to put the variable #countPics# in the IsDefined function. ColdFusion gives me an error because it finds the # in the middle of it.
Previously, a photo album was limited to 40 photos. Each and every possibility was given from 1 to 40. I want to compact the code so that I have one statement like the one below.
Can anybody get me thinking in the right zone?
MrsBean
Previously, a photo album was limited to 40 photos. Each and every possibility was given from 1 to 40. I want to compact the code so that I have one statement like the one below.
Can anybody get me thinking in the right zone?
Code:
<cfif IsDefined(delete_pic#countPics#)>
<cfset #file_type# = "_#countPics#.jpg">
<cfinclude template="pa_photo_delete.cfm">
<cfset #pictures_list# = #ListSetAt(pictures_list, #countPics#," ")#>
<cfset #captions_list# = #listSetAt(captions_list, #countPics#," ")#>
<cfelseif IsDefined(caption_#countPics#)>
MrsBean