Hi,

I am trying to do somethign where a person has a screen where he is shown the months and below that regions. He can choose as many months as he wants and as many regions as he wants (these are checkboxes) - and the database should display all results matching those months and regions. It is a database of road races.

I cannot get it to work however - it never seems to query the database correctly according to all months and regions selected. Here is a the code i am using - PLEASE help - there is a silly problem somewhere or I am missing something;

for ($i=0;$i<sizeof($month);$i++) {
$dbName = "";
$MysqlName = "";
$MysqlPW = "";
$month2=$month[$i];

for ($j=0;$j<sizeof($region);$j++) {
$region2=$region[$j];
echo "<P>";

}
mysql_connect("localhost",$MysqlName,$MysqlPW);
$SelectStr = "SELECT * FROM roadrunning WHERE region LIKE '$region2' AND month LIKE '$month2'";
$Results = MySQL($dbName,$SelectStr);
$RowCount = MySQL_NUMROWS($Results);
$k = 0; WHILE ( $k < $RowCount){
echo MySQL_RESULT($Results,$k,"racename");
echo "<P>";
$k++;
}

}

Thanx
Tony