help with multiple select

From: Date: Tue, 15 Jul 2003 15:41:06 +0000
Subject: help with multiple select
Groups: php.windows 
Request: Send a blank email to php-windows+get-20819@lists.php.net to get a copy of this message
Hello there.... I'm trying to get the options selected from a multiple select list, but the only one thing that i get is the first letter from one element, check this please.... This is the form code. <form name="form1" method="post" action="checaMultiple.php"> <p> <select name="Multiplo" multiple size="3"> <option value="Fernando">Fernando</option> <option value="Felipe">Felipe</option> <option value="Felix">Felix</option> <option value="Carlos">Carlos</option> <option value="Eli">Eli</option> </select> </p> <p> <input type="submit" name="Submit" value="Submit"> </p> </form> and this is the code where i try to get the options selected $multiplo = $_POST['Multiplo']; echo "Cuantos seleccionados: " . count($multiplo); // In this line I always get 1 $j = 0; while($j<count($multiplo)){ echo "No: " . $j . ", " . $multiplo[$j]; $j++; } If I select only one element, i get the first letter of that element, but if I select two or more elements i get the first letter of the last element selected. Can somebody tell me what's wrong? Thanks in advance.. eLFeR....

« previous php.windows (#20819) next »