hello u silly person.

lets say the forms made were day1, day2, and day3
and i also have a hidden form called "how" that has the values of how many
"day" forms i have, which is 3.


this is how u would call them out dynamically when you do your update query


<CFLOOP index="number" FROM = 1 TO = '#Form.how#'>
<CFQUERY name="blah" datasource="hehe">
UPDATE Table
Set  mookie = '#Evaluate('Form.Day' & number)#'
</CFLOOP>


easy eh?

----- Original Message -----
From: Jason <[EMAIL PROTECTED]>
To: CF-Talk <[EMAIL PROTECTED]>
Sent: Wednesday, April 04, 2001 2: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/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to