I have a form that is uploading up to four files:
Picture 1:<input type="file" name="pic1" size="20">
Picture 2:<input type="file" name="pic2" size="20">
Picture 3:<input type="file" name="pic3" size="20">
Picture 4:<input type="file" name="pic4" size="20">
and a second page that is doing the uploads:
<cfif Trim(pic1) IS NOT "">
<cffile action="upload" destination="server's address" filefield="pic1" nameconflict="makeunique">
</cfif>
<cfif Trim(pic2) IS NOT "">
<cffile action="upload" destination="server's address" filefield="pic2" nameconflict="MAKEUNIQUE">
</cfif>
<cfif Trim(pic3) IS NOT "">
<cffile action="upload" destination="server's address" filefield="pic3" nameconflict="makeunique">
</cfif>
<cfif Trim(pic4) IS NOT "">
<cffile action="upload" destination="server's address" filefield="pic4" nameconflict="makeunique">
</cfif>
The uploading works fine... the problem arises when I try to insert the names of the uploaded files into a database. I am using the #file.clientfile# value but this only captures the last uploaded file's information, not all of the files. Is there a way to get each files name to insert into the table at the time of upload?
Thanks!!
Picture 1:<input type="file" name="pic1" size="20">
Picture 2:<input type="file" name="pic2" size="20">
Picture 3:<input type="file" name="pic3" size="20">
Picture 4:<input type="file" name="pic4" size="20">
and a second page that is doing the uploads:
<cfif Trim(pic1) IS NOT "">
<cffile action="upload" destination="server's address" filefield="pic1" nameconflict="makeunique">
</cfif>
<cfif Trim(pic2) IS NOT "">
<cffile action="upload" destination="server's address" filefield="pic2" nameconflict="MAKEUNIQUE">
</cfif>
<cfif Trim(pic3) IS NOT "">
<cffile action="upload" destination="server's address" filefield="pic3" nameconflict="makeunique">
</cfif>
<cfif Trim(pic4) IS NOT "">
<cffile action="upload" destination="server's address" filefield="pic4" nameconflict="makeunique">
</cfif>
The uploading works fine... the problem arises when I try to insert the names of the uploaded files into a database. I am using the #file.clientfile# value but this only captures the last uploaded file's information, not all of the files. Is there a way to get each files name to insert into the table at the time of upload?
Thanks!!