php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #11741 Multiple select gives back only the last selected option
Submitted: 2001-06-27 11:11 UTC Modified: 2001-06-27 11:45 UTC
From: flatline at mail dot tvnet dot hu Assigned:
Status: Not a bug Package: Unknown/Other Function
PHP Version: 4.0.4pl1 OS: Debian 2.2.19 Potato
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: flatline at mail dot tvnet dot hu
New email:
PHP Version: OS:

 

 [2001-06-27 11:11 UTC] flatline at mail dot tvnet dot hu
Here is the form, with a multiple list:
------------------
<form name="form1" method="post" action="doit.php3">
  <select name="opciok" size="2" multiple>
    <option value="1">aaaaa</option>
    <option value="2">bbbbb</option>
    <option value="3">ccccc</option>
  </select>
  <input type="submit" name="Submit" value="Submit">
</form>

doit.php3:
-----------------
<?
echo $opciok; /* output: 3*/
/* It would be nice to use it as an array, to reach all the selected option values.

And I don't want to use the GET method, to parse the Query String.

*/
?>

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-06-27 11:45 UTC] sniper@php.net
You have to make it an array:

<select name="opciok[]" size="2" multiple>

And then $opciok is an array that contains the selected
values.

--Jani

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 03:01:27 2024 UTC