Where are you setting this variable '
SESSION.consumerProduct.Cnsmr_ProductID ' prior to this block of code?

William


-----Original Message-----
From: Fawzi Amadu [mailto:abd...@gmail.com] 
Sent: Thursday, February 26, 2009 6:43 AM
To: cf-talk
Subject: Session Variable not being set - variable created during processing


I am trying to assign the value generated for the variable filename to a
session variable, but when I process the page, Coldfusion reports that:

"The form field SESSION.consumerProductExtraImg.Img1 did not contain a
file." yet I had uploaded files.

What am I doing wrong? TIA

<cfset numberoffields = 8>

<cfform action="process_UpLoadExtraConsumerProductImages.cfm"
enctype="multipart/form-data">
  <cfloop index="i" from="1" to="#variables.numberoffields#" step="1"> 
  <cfset filename = "#SESSION.consumerProduct.Cnsmr_ProductID#" & #i#>
    <cfinput type="File" name="<cfoutput>#variables.filename#</cfoutput>"
/><br />
        <!--- Set the respective file name for the uploaded image --->
        <cfset SESSION.consumerProductExtraImg["Img" & i] = "#filename#">
  </cfloop> 
    <cfinput type="Submit" name="upload" value="upload" />
</cfform> 



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:319867
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to