You can use the evaluate function so you would do. You can pass the counter
variable to this page and loop though like so.
<cfloop from="1" to="#counter#" step="1" index="SecondCounter">
<cfset FieldName = evaluate("fieldName#Secondcounter#")>
<cfset FieldID = evaluate("FieldID#Secondcounter#")>
Then do you update or insert here.
</cfloop>
----- Original Message -----
From: "Jason" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Wednesday, April 04, 2001 4:01 PM
Subject: Form Question
> Maybe Im being dense today but I can do this in ASP pretty easy I just
need
> to know how to do it in CF.
>
> I have a form that outputs a series of similar items that I allow the user
> to change all at once with one form submit
>
> example
> <INPUT TYPE="TEXT" NAME="FIELD_NAME#COUNTER#" VALUE="#FIELD_NAME#">
> <INPUT TYPE="TEXT" NAME="FIELD_ID#COUNTER#" VALUE="#ID#">
>
> In ASP I am looping through the set like this
>
> StrField_Name = Request.Form(Cstr("Field_name" & Varcounter))
> IntField_ID = Request.Form(Cstr("Field_ID" & Varcounter))
>
> THen I can do an update loop for however many of the same fields there are
> like follows
>
> Update Table
> Set Field_Name = '"&StrField_Name&"'
> Where ID = "&IntField_ID&"
>
>
> So in effect getting Field_Name1 and Field_ID1, Field_Name2 and Field_ID2
>
>
> Maybe Ive been switching back and forth between CF and ASP too much but I
> can't recall the method to do this in CF. Must need more coffee.
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists