I have an online search with a drop list that allows multiple selections, then sends them as an array to a script on a different page to be used as the database search criteria. the problem is that I can't get it to read the actual selections, instead it just selects everything regardless of the array values. When I don't send it as an array it repeats the variable for each value and the recieving page only recognizes the last value sent. Is this even a good way or is there something better besides an array?
the code looks like this:
///////form code///////
<form action="recieve.php" method="get">
<input type="hidden" name="src" value="catagorySearchResults">
<select MULTIPLE name="Catagory[]" size="3">
<option>All</option>
<option>Accounting</option>
<option>Acupuncture</option>
<option>Advertising</option>
<option>Air Filters</option>
<option>Art</option>
//////etc.///////
</select>
<br>
<input name="submit" type="submit" value="Search">
</form>
////////recieve code/////////
case "catagorySearchResults":
$x = 0;
$Catagory = ($HTTP_GET_VARS['Catagory']);
$result = mysql_query("SELECT contNum, BusNam FROM ClientInfo WHERE Catagory LIKE '%".$Catagory."%' ORDER BY 'BusNam' 'a TO z'",$link) or die("error with the sql statement");
while ($myrow = mysql_fetch_row($result)) {
echo $myrow[1];
echo "<a href=AdminEdit.php?src=displayClientdet&contNum={$myrow[0]}><strong>View and Edit</strong></a>";
$x = ($x+1);
}
echo "<br><center>";
echo "TOTAL NUMBER OF ENTRIES = ";
echo $x;
break;