How to pass several variables to the WHERE condition of a SELECT query?

Using php-mysql - Would anyone care to advise on how best to pass user made selections via check boxes to the WHERE condition of a mysql SELECT query?

I can better describe the parameters of my objective to anyone interested in advising me.


The cheap and nasty way is to add the Where clause for each selected checkbox into an array, then to implode the array together with the appropriate OR or AND keyword.

Better (and potentially safer) techniques can be performed, but depend on the situation that’s being dealt with.

Perhaps you could provide a sample scenario?