Thanks drawmack, I'll give that a try.
So when I submit the form that would email all clients where I have selected specific fruits (again, there are checkboxes) like:
<input type="checkbox" name="fruit[]" value="Pear">
<input type="checkbox" name="fruit[]" value="Peaches">
I would you just implode the selected 'fruits' like:
$fruits = implode(",", $fruits);
Then would I use the variable '$fruits' to use in the query like:
select distinct(a.*) from users_table as a, prefs_table as b, users_to_prefs as c where a.id = b.userid and b.pref_id = c.id and c.name in ($fruits)
But you give an example of ('apples','oranges')
How could I take my array and insert it into that query?
Thanks again for all your help! I really appreciate it.