ID:               24178
 Updated by:       [EMAIL PROTECTED]
 Reported By:      fernando at reweb dot com dot br
-Status:           Open
+Status:           Bogus
 Bug Type:         Arrays related
 Operating System: Free BSD 4.8
 PHP Version:      4.3.2
 New Comment:

Default "send" method for forms is GET, not POST.

Change:
<form action="send.php"> 
to:
<form action="send.php" method="POST">

and it will work fine.



Previous Comments:
------------------------------------------------------------------------

[2003-06-13 14:49:44] fernando at reweb dot com dot br

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 this bug report at http://bugs.php.net/?id=24178&edit=1

Reply via email to