Hallo,
wie werte ich eine Auswahlbox, in der man mehrere Werte auswählen kann?
	
Das print_r() gibt aber jeweils nur den ersten selektierten Wert aus.
Kann mir jemand helfen?
					wie werte ich eine Auswahlbox, in der man mehrere Werte auswählen kann?
PHP Code:
	
	
print_r($_POST);
$sql="SELECT * FROM $table2 GROUP BY $table2.$table2_country";
    //$echo.= $sql;
    $echo.= "<form action='test.php' method='post'>"; 
    $result = mysql_query($sql);
    $echo.= "<table><tr><th>Land</th><th>Logistikzentrum</th><th>Bereich</th><th>Zeitraum</th></tr><tr>";
    $echo.= "<td><select width='20' name='country' size='5'  multiple>";
    if($country=="alle"){
        $echo.= "<option selected value='alle'>alle</option>";
    }
    else{
        $echo.= "<option value='alle'>alle</option>";
    }
    while ($row = mysql_fetch_assoc($result)){
        if($row['country']==$country){
            $echo.= "<option selected value='".$row['country']."'>".$row['country']."</option>";
        }
        else{
            $echo.= "<option value='".$row['country']."'>".$row['country']."</option>";
        }
    }
    $echo.= "</select></td>";    
$echo.= "<td><input type='submit' name='submit'></td>";
echo $echo; 
Kann mir jemand helfen?
 
          
Comment