0

for example :
I have 4 check box with their own variables a,b,c,d
How can I create query with condition using what users choose,
where users can choose more than one check box

thanks for your support

4
Contributors
4
Replies
5
Views
9 Years
Discussion Span
Last Post by nav33n
0

maybe something like:
"select.....blah blah....where a = $_POST and b = $_POST"
and the html is:
<input type='checkbox' name='checkboxarrayname[a]' value='1'>

basically using posting array variables
HTH

0

the problem is we don't know which checkbox is checked and count how many checkbox is checked, example we know 2 checkbox is checked so the query is two condition. if three checkbox is checked so the query is three condition.
can I make a query with a dinamic condition according how many checkbox is checked?

0

When you submit the page, only those checkboxes which were checked will be submitted. So, you will have the count of checkboxes which are checked, you will have all the checkboxes which were checked. Build your query depending upon those values.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.