Your multiple form field contents will show up in lists, as in:
Form.firstname = Jim,Tom,Sandy,Tina
Simply loop over the lists using LISTLEN in your loop:
<!--- check for content. Client side validation should check for data in
all three fields --->
<cfif LEN(ListFirst(form.firstname))>
<cfloop FROM=1 TO=#ListLen(Form.Firstname)#" index="ii">
<cfquery ...>
INSERT INTO myTable (firstname,lastname,number)
VALUES
('#ListGetAt(form.firstname,ii)#','#ListGetAt(form.lastname,ii)#','#List
GetAt(form.number,ii)#')
</cfloop>
</cfif>
-----Original Message-----
From: Webmaster [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 27, 2002 4:01 PM
To: CF-Talk
Subject: multiple inserts
I need to create a form with 3 fields. Friends First Name, Friends Last
Name, Friends Phone number. I want to have multiple fields for each so
there maybe 10 friends first name and last name and so on. How do I set
up my form so all this is inserted into the database at the same time. I
am using Access 2000 and CF 4.5.
______________________________________________________________________
This list and all House of Fusion resources hosted by CFHosting.com. The place for
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists