Answered
Dynamic variable inside cfloop
Good day
I have a dynamic form which looks something like this...
<Cfloop from 1 to 6 indes i>
<cfinput type="text" name="description#i#" class="TextBlock">
</cfloop>
When submitting, I want to insert description#i# into a db
At the moment i have this...
<Cfset thedescription = description#i#">
<cfquery name="insertpic" datasource="#application.db#">
INSERT INTO tblpics
(description,)
VALUES ('#thedescription#')
</cfquery>
Its all inisde a loop
How do i set description#i# = somevar?
Please can someone assist?
Regards
Delon
I have a dynamic form which looks something like this...
<Cfloop from 1 to 6 indes i>
<cfinput type="text" name="description#i#" class="TextBlock">
</cfloop>
When submitting, I want to insert description#i# into a db
At the moment i have this...
<Cfset thedescription = description#i#">
<cfquery name="insertpic" datasource="#application.db#">
INSERT INTO tblpics
(description,)
VALUES ('#thedescription#')
</cfquery>
Its all inisde a loop
How do i set description#i# = somevar?
Please can someone assist?
Regards
Delon
