Piperjim
01-26-2008, 05:39 PM
I have a multi checkbox with 9 boxes they can select any three from the 9
This is one box of the 9
<input type="checkbox" name="subject[]" value="organic" onClick="CountChecks(this)">for Organic</font>
then submit to
<?php
$where = join($subjectChecked, ' = "y" OR ') . ' = "y"';
//Create Query
$query = "SELECT * FROM part WHERE $where AND WARDS = 'y' AND pet = 'y'";
$result = mysql_query($query) or die (mysql_error());
$num = mysql_numrows($result);
?>
If in the database pet='n' it still brings it up as 'y'
it seem to find WARDS and 'y' and then ignore pet
any ideas on this please
This is one box of the 9
<input type="checkbox" name="subject[]" value="organic" onClick="CountChecks(this)">for Organic</font>
then submit to
<?php
$where = join($subjectChecked, ' = "y" OR ') . ' = "y"';
//Create Query
$query = "SELECT * FROM part WHERE $where AND WARDS = 'y' AND pet = 'y'";
$result = mysql_query($query) or die (mysql_error());
$num = mysql_numrows($result);
?>
If in the database pet='n' it still brings it up as 'y'
it seem to find WARDS and 'y' and then ignore pet
any ideas on this please