|  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
 [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>
  <input type="submit" name="Submit" value="Submit">

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.



Add a Patch

Pull Requests

Add a Pull Request


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

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

And then $opciok is an array that contains the selected


PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Tue May 17 14:05:46 2022 UTC