werde mal ein bissel mehr schreiben :)
for ($d=1; $d < 11; $d++){
$filter[$d] = $filter.$d;
echo $filter.$d;
if ("$filter"."$d" == "")
{
$filtern[$d] = "";
}
else
{
$filtern[$d] = "where $filterspalten[$d] in ('$filter[$d]')";
}
echo $filtern[$d];
if ($filternan[$d] == on){
$result = mysql_query("SELECT DISTINCT
$filterspalten[$d]
FROM
bestand
ORDER BY
$filterspalten[$d]
ASC") or die(mysql_error());
while($row = mysql_fetch_assoc($result)) {
foreach($row as $key => $wert)
{
$ergebnis[$d][]=$wert;
}
}
echo "<td>";
echo "<form method="POST" name="filter$d">";
echo "<select name="".filter[$d]."" onchange="document.filter[$d].submit()">";
foreach($ergebnis[$d] as $key => $wert)
{
if ( $ergebnis[$d][$key] == $filter[$d] )
{
$optionen = $ergebnis[$d][$key];
echo "<option selected="selected">$optionen</option>4";
}
else{
$optionen = $ergebnis[$d][$key];
echo "<option>$optionen</option>";
}
}
}
}