2 Replies Latest reply on Nov 14, 2008 3:03 AM by Flashdakota

    Dynamic variable inside cfloop

    Flashdakota Level 1
      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