Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Help please <cfloop issue

Posted on 2014-02-21
8
Medium Priority
?
183 Views
Last Modified: 2014-02-26
Hi,

How can I pass my counter thru this loop.
the files name that I have are:
file_1
file_2
file_3

 <cfset maxFiles = 3>
 
 <cfloop from="1" to="#maxFiles#" index="counter">
 
  <cfdump var="#Form.file_#counter#">

 </cfloop>
0
Comment
Question by:lulu50
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
8 Comments
 
LVL 4

Expert Comment

by:Rodrigo Munera
ID: 39877700
You can use brackets:

#form["file_" & counter]#
0
 

Author Comment

by:lulu50
ID: 39878003
no I can't
0
 

Author Comment

by:lulu50
ID: 39878024
Error Occurred While Processing Request
File '' does not exist.

 value="#FileReadBinary(form["file_" & counter])#">


can't use double cote
0
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
LVL 4

Expert Comment

by:Rodrigo Munera
ID: 39878029
use single quote

value="#FileReadBinary(form['file_' & counter])#">
0
 
LVL 4

Expert Comment

by:Rodrigo Munera
ID: 39878033
Or the other way around:

value='#FileReadBinary(form["file_" & counter])#'>
0
 

Author Comment

by:lulu50
ID: 39886841
no I still have an error

The tag must be nested inside a cfquery tag.

I tried:

 <cfqueryparam cfsqltype="cf_sql_blob"
              value='#FileReadBinary(form["file_" & counter])#'>

and this

<cfqueryparam cfsqltype="cf_sql_blob"
              value="#FileReadBinary(form['file_' & counter])#">
0
 
LVL 4

Accepted Solution

by:
Rodrigo Munera earned 2000 total points
ID: 39886909
You can't save files like that,
you must first upload the file to your server
https://wikidocs.adobe.com/wiki/pages/viewpage.action?pageId=87505342

and then you can use filereadbinary
https://wikidocs.adobe.com/wiki/display/coldfusionen/FileReadBinary
0
 

Author Closing Comment

by:lulu50
ID: 39888879
Thanks
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hi, Even though I have created this Tutorial on My personal Blog, Some people might not able to find my website, So here i am posting it again Today, from the topic it is very clear that i will be showing you here the very basic usage of how we …
CFGRID Custom Functionality Series -  Part 1 Hi Guys, I was once asked how it is possible to to add a hyperlink in the cfgrid and open the window to show the data. Now this is quite simple, I have to use the EXT JS library for this and I achiev…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question