#24178 [NEW]: Post an array
From: fernando at reweb dot com dot br
Operating system: Free BSD 4.8
PHP version: 4.3.2
PHP Bug Type: Arrays related
Bug description: Post an array
Description:
------------
When I post an array and try do recover it I can´t do it. The result
values doesn´t fetch the posted values.
Reproduce code:
---------------
##form.php##
<form action=\"send.php\">
<input type=\"checkbox\" name=\"opt[]\" value=\"aaa\">
<input type=\"checkbox\" name=\"opt[]\" value=\"bbb\">
<input type=\"checkbox\" name=\"opt[]\" value=\"ccc\">
<input type=\"checkbox\" name=\"opt[]\" value=\"ddd\">
<input type=\"checkbox\" name=\"opt[]\" value=\"eee\">
<input type=\"submit\" value=\"Send\">
##send.php##
$vars = $_POST;
$opcoes = $vars['opt'];
echo "$opcoes[0]###$opcoes[1]###$opcoes[2]###$opcoes[3]###$opcoes[4]";
## The result should be "aaa###bbb###ccc###ddd###eee", but it prints
"A###r###r###a###y" (the word "Array")
Expected result:
----------------
aaa###bbb###ccc###ddd###eee
Actual result:
--------------
A###r###r###a###y
--
Edit bug report at http://bugs.php.net/?id=24178&edit=1
--
Try a CVS snapshot: http://bugs.php.net/fix.php?id=24178&r=trysnapshot
Fixed in CVS: http://bugs.php.net/fix.php?id=24178&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=24178&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=24178&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=24178&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=24178&r=support
Expected behavior: http://bugs.php.net/fix.php?id=24178&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=24178&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=24178&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=24178&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=24178&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=24178&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=24178&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=24178&r=gnused
Thread (4 messages)
- fernando at reweb dot com dot br