EasyCFM.COM ColdFusion Forums / Dreamweaver / Pass multiple values from checkboxes CF/Dreamweave

   Reply to Discussion | New Discussion << previous || next >> 
Posted By Discussion Topic: Pass multiple values from checkboxes CF/Dreamweave

book mark this topic Printer-friendly Version  send this discussion to a friend  new posts last

JoelG
09-08-2010 @ 7:53 AM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
New Member
Posts: 1
Joined: Sep 2010

Using dreamweaver, I am trying to pass the value from multiple check boxes to a page where I can query my db and have it return and display the results.  The name of the check box on the form page is cb_cont.  All of the values from the check box are looking for date from same column from within the same table.

If i just check one record in the form and submit it, then i get the result i want, if I select multiple records i return no error but also no result.

I know that the multiple values are being passed because if i display the results of contID as follows:

p><cfoutput>#contID#</cfoutput></p>

It shows me the multiple values on the query page ie:1, 11, 13, 26

My code is as follows:

<cfset contID = #form.cb_cont#>

<cfparam name="contID" default="11,9" type="Numeric">
<cfquery name="rs_recipients" datasource="sms">
SELECT *
FROM qry_table1
WHERE ID IN (<cfqueryparam value="#contID#" cfsqltype="cf_sql_numeric">)
</cfquery>

<cfoutput query="rs_recipients">
  <table width="80%" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td>#rs_recipients.full_nam#</td>
    </tr>
  </table>
</cfoutput>

Any help is appreciated.  I only have 3 hairs left, then i have to quit. Wink


Website Designed and Developed by Pablo Varando.