Hello everyone, i am facing a problem with multiple checkbox.
I have set few checkbox as a selection, then send to database for search result.
For example the checkbox including hotel features like, aircont, 24 hour reception, swiming pool etc.
after tick the check box , will send to result page to get the Hotel match with the selection checkbox.
But my level only can make just one selection and get the result, if choose more than 1 selection will get error.
I have set few checkbox as a selection, then send to database for search result.
For example the checkbox including hotel features like, aircont, 24 hour reception, swiming pool etc.
after tick the check box , will send to result page to get the Hotel match with the selection checkbox.
But my level only can make just one selection and get the result, if choose more than 1 selection will get error.
Code:
<--- HTML Page --->
<cfform action="test_action.cfm">
<cfoutput query="Features">
<input type="checkbox" name="FeatureID" value="#FeatureID#">#Feature# <br </cfoutput>
<input type="submit" value="Search">
</cfform>
Code:
<--- Query Page ---> <cfparam name="FORM.HotelID" default=""> <cfquery name="Hotel" datasource="#ds#"> SELECT Hotel_ID, Name FROM Hotel WHERE 0=0 <cfif FORM.HotelID IS NOT ""> AND HotelID = #FORM.HotelID# <cfoutput query="Hotel"> <tr> <td>#HotelID#</td> <td>#Name#</td> </tr> </cfoutput> </cfif>
Comment