i have values in two fields i want searched: Pulmonary PathologyRenal Pathology (table.specialty) and Chemical PathologyHematopathology (table.subspecialty)
I'm trying to search these two fields using a large number of checkboxes using
$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";
if i search JUST Pulmonary Pathology or JUST Hematopathology i get my results, but if i search with terms that are NOT in the fields (Molecular Diagnostics) I get NO results.
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
Thanks
GN