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....



-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to