php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #19554 each array elements value loss first 4 charactors.
Submitted: 2002-09-22 21:31 UTC Modified: 2003-04-06 21:13 UTC
From: fujsiaki at tkk dot att dot ne dot jp Assigned:
Status: Closed Package: mbstring related
PHP Version: 4.2.3 OS: Linux(RedHat7.2/kernel2.4.7-10)
Private report: No CVE-ID: None
 [2002-09-22 21:31 UTC] fujsiaki at tkk dot att dot ne dot jp
Hi!
I use <SELECT> tag with "array" <OPTION> tag.
But it drop 4 charactor each array elements.
This fact is not happen on version 4.1.2.

Code is follow:
-----------------------------------
<HTML>
<HEAD>
<TITLE>List Box Sample</TITLE>
<meata http-equiv="Content-Type" Content="text/html; charset=EUC-JP">
</HEAD>
<BODY>
<FORM ACTION="<?php print $PHP_SELF; ?>" METHOD="POST">
<SELECT NAME="listbox[]" MULTIPLE>
<OPTION value="000000">me</OPTION>
<OPTION value="111111">you</OPTION>
<OPTION value="222222">we</OPTION>
<OPTION value="333333">them</OPTION>
</SELECT>
<INPUT TYPE="SUBMIT" NAME="cmd" value="Send">
</FORM>
<PRE>
<?php
if (isset($_POST["listbox"])) {
        foreach($_POST["listbox"] as $val) {
                print "Your select is " . $val . "<br>";
        }
}
?>
</PRE>
</BODY>
</HTML>
-----------------------------------

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-09-23 00:56 UTC] derick@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.

For now you can recompile without --enable-mbstr-enc-trans
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Oct 31 23:01:28 2024 UTC