I'm gathering N number of questions from a form, and inserting them into a table. So I use a loop to accept N questions from the form and execute N number of queries.
I want to do the insert #FORM.qcount# times, referencing the values FORM.type_idX where X is the number in the loop. I can't figure out how to get the field names, represented below by FORM.type_idX and FORM.qtextX to show up right.
<cfloop index="i" from="1" to="#FORM.qcount#" step="1">
<!--- insert the question into the pool --->
<cfquery datasource="#DSN#" username="#acuiwebdbuser#" password="#acuiwebdbpass#" name="InsertQuestions">
INSERT into survey_qtext (type_id, text) values ('#FORM.type_idX#', '#FORM.qtextX#')
I've tried everything I can think of, even setting variables and then using the variables. What am I missing?