I'm trying to search these two fields using a large number of checkboxes using
Code: Select all
$checkbox1 = $_POST['specialty'];
$string1 = '*'.@implode('*',$checkbox1).'*';
$checkbox2 = $_POST['subspecialty'];
$string2 = '*'.@implode('*',$checkbox2).'*';
$sql="SELECT * FROM $tbl_user WHERE specialty LIKE '%$string1%' OR subspecialty LIKE '%$string2%' ORDER BY contact_name ASC";
Can someone show me how to get SOME of the data that's in a field using checkboxes... PLEASE? i've been on this all day...
my inputs look like:
<LI><INPUT type="checkbox" name="subspecialty[]" value="Chemical Pathology">Chemical Pathology
<LI><INPUT type="checkbox" name="subspecialty[]" value="Hematopathology">Hematopathology
Please help?
Thanks
GN