You would need to know the table structure to get an idea of how to write the script...the cool thing about checkboxes is that you could pass those values in a key => value array where the key would be the table name and the value would be the column ...for example:
HTML Code:
<p>
<input name="db_tables[members_table][memberno]" type="checkbox" id="memberno" value="51"/>
Member No
</p>
In this approach you could loop through "$_POST[db_tables][members_table]" to gather all the fields which criteria should match...but some might have problems with the approach in regard to security since you give away your table structure in the source, but the code would look like...
PHP Code:
$select_fields = '';
foreach($_POST['db_tables'] as $tbl => $cols_array){
$x=0;
foreach($cols_array as $col){
$select_fields .= $tbl . '.' . $col;
$x++;
}
$select_fields .= ($x < sizeof($cols_array)) ? ',' : '';
}
$qry = "SELECT $select_fields FROM ...";
Another approach would be to simply loop the checkboxes and append your query of one is set. But this is just a shot in the dark to give you an idea to start thinking, There is probably a better way but would need some pretty detailed info.
Bookmarks