Just keep adding them to the form then on your action page you get their value 
like this:

#FORM.carpool_location#

-----Original Message-----
From: Barry Mcconaghey [mailto:bmcconag...@gmail.com] 
Sent: Thursday, February 11, 2010 2:07 PM
To: cf-talk
Subject: Re: cfinsert multiple records into DB


Thanks Chad!

It worked.

Question...how do I add more input fields.

I would like to add this to my final code:

<input type="text" size="40" name="carpool_location" />

Final code that works:

<cfselect name="player" size="1">
<cfoutput query="contacts">
  <option value="#contacts.contactID#">#contacts.FirstName# 
#contacts.LastName#</option>
</cfoutput>
</cfselect>

Action page:

<cfquery datasource="mydb" name="getFirstAndLast">
SELECT FirstName, LastName
FROM contacts
WHERE contactid = #FORM.player#
</cfquery>

<cfquery datasource="mydb" name="insertPlayer">
INSERT player (contactID, player)
VALUES (#FORM.player#,'#getFirstAndLast.FirstName# #getFirstAndLast.LastName#')
</cfquery> 



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:330612
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to