php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #20178 SELECT MULTIPLE array returned by form not returning full values.
Submitted: 2002-10-30 15:50 UTC Modified: 2002-10-30 18:09 UTC
From: nate at visionsacademy dot org Assigned:
Status: Closed Package: mbstring related
PHP Version: 4.2.3 OS: Linux (hosted by PowerSurge.net)
Private report: No CVE-ID: None
 [2002-10-30 15:50 UTC] nate at visionsacademy dot org
Recently we migrated an online learning tool from Crazyhosting.net (PHP 4.04 W/ Zend Optimizer) to Powersurge.net (PHP 4.2.3) and the arrays returned by multi-selects in the forms appear to not be returning full values.

[html page]
<select name="skill_sets[]" multiple size=8>
<option>Academics
<option>Math
<option>Problem Solving
<option>Project Management
<option>Public Speaking
<option>Reading for Comprehension
<option>Technology
<option>Writing
</select>
[end of html page]

[php page to check values]

//get the values for skill sets from the form
$test = $_POST['skill_sets'];

//This should say 'Array'
echo "Skill sets posted as: ".$test;

//step through the skill sets, echoing each one.
for ($a = 0; $a < count($test); $a++ ) {

	echo "<li>".$test[$a];


}
[end of php page]

[output with all selected]
Skill sets posted as: Array
* emics
*
* lem Solving
* ect Management
* ic Speaking
* ing for Comprehension
* nology
* ing
[end of output]

Everything was working fine on 4.04...

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-10-30 18:09 UTC] moriyoshi@php.net
This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.

Also try --disable-mbstr-enc-trans if you even want to use 4.2.3.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 20 09:01:28 2024 UTC