multiple criteria selection
In my table of contacts, all contacts have a category (=numeric value). Now I want to be able to select contacts in one or more categories (for instance "Family"+ "Team mates" + "Colleagues", "Team mates" + "Colleagues" or "Family" only).
For this, I made in Dreamweaver a selection page with a select list.
In this list, the names of my categories appear, and the corresponding value is selected when the category is selected.
The resulting value of the select list is send with $_POST['result'] to the next page. So far, no problem. I need some help however in using $_POST['result'] in my MySQL statement.
I tried ...WHERE r_categorie in ($_POST['result']).... This works fine when only one contact category is selected.
When more categories are selected, this WHERE clause gives only the last one that was selected in the select list.
What should I change? Is the select list the most appropriate way of making the selection (knowing that the category list is dynamic)?
Any help will be greatly appreciated.
Kind regards,
Erik