Question
Using Dynamically-Generated Variables
I'm sure there's a CF function to do this, I'm just not
familiar with it.
I've got a simple query named "people" that returns three names, say: "Amber, Bob, Chuck." Now, I want to generate variables with the name: xStreetName where 'x' would be replaced. I'm using a CFLOOP, so 'x' would actually be something like #people.name#. So, I'd be left with three variables named AmberStreetName, BobStreetName, and ChuckStreetName.
The dynamically generated variables then populate a blank form. The user will then submit the Street Name values for Amber, Bob and Chuck.
On the next page, I'd like to use a dynamically-generated SQL statement to add both the dynamically-generated variable name and the associated values to a database.
I've got a simple query named "people" that returns three names, say: "Amber, Bob, Chuck." Now, I want to generate variables with the name: xStreetName where 'x' would be replaced. I'm using a CFLOOP, so 'x' would actually be something like #people.name#. So, I'd be left with three variables named AmberStreetName, BobStreetName, and ChuckStreetName.
The dynamically generated variables then populate a blank form. The user will then submit the Street Name values for Amber, Bob and Chuck.
On the next page, I'd like to use a dynamically-generated SQL statement to add both the dynamically-generated variable name and the associated values to a database.
