Skip to main content
Inspiring
September 4, 2013
Question

cfselect passing mutiple field values to database

  • September 4, 2013
  • 0 replies
  • 763 views

I have a table that lists a class schedule and a table for people who register for a class. I use a query to populate the cfselect drop-down. My question is: Can I pass fields from the session query into the registration table when the form submits???   Thank you:)

<cfquery name="session" datasource="webadmin">

                   

                    SELECT Class, date1, date2, location, message

                    from mobilitySchedule

                    where dropDate >= Now()

                    order by ID desc

                   

                    </cfquery>

When a user selects a class I want the location and message fields submitted to the database when the form is submitted. Right now only the class selected is submitted.  Is this possible? I am beg - int in coldfusion. Thank you

<---form select--->

<label for="name">SESSION:</label>

    <cfselect name="Class">

                 <option selected="selected">Select a class</option>

                       

                    <cfoutput query="session">

                          <option value="#Class#">#Class# </option>  

                     </cfoutput>

</cfselect>

This topic has been closed for replies.