Is there anyone can tell me what's wrong with the following code? I am trying to do a search from a multiple select menu. It told me bad arguments with implode. Thanks!
In page1:
echo '<select name="test[]" multiple>';
echo '<option> ALL </option>';
echo '<option> t1 </option>';
....
echo '</select>';
.....
In page2:
....
$testId=$_POST['test[]'];
$q="SELECT ....FROM table WHERE";
$where ="....AND .... AND...";
if($testId!="ALL") {
$test_s=is_array($testId);
$testId=implode("," , $test_s);
$where.=" AND test='$testId'";
}
....
$sql=$q.$where;
$result=mysql_query(...);
....
Any help is appreciated.