#43966 [Opn->Bgs]: POST ARRAY FUNCTION
| From: | msaraujo@php.net | Date: | Tue, 29 Jan 2008 16:22:02 +0000 |
| Subject: | #43966 [Opn->Bgs]: POST ARRAY FUNCTION | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-121739@lists.php.net to get a copy of this message | ||
ID: 43966
Updated by: msaraujo@php.net
Reported By: marcel at zwerfkei dot nl
-Status: Open
+Status: Bogus
Bug Type: Arrays related
Operating System: Linux 2.6.18
PHP Version: 5.2.5
New Comment:
Sorry, but your problem does not imply a bug in PHP itself. For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system
is not the
appropriate forum for asking support questions. Due to the volume
of reports we can not explain in detail here why your report is not
a bug. The support channels will be able to provide an explanation
for you.
Thank you for your interest in PHP.
Hello, you should use var_dump() or maybe check your ajax script. It is
an userland issue, not a PHP problem itself.
array
'thema' =>
array
0 => string '0' (length=1)
1 => string '1' (length=1)
2 => string '2' (length=1)
3 => string '3' (length=1)
'check' => string 'check' (length=5)
Previous Comments:
------------------------------------------------------------------------
[2008-01-29 15:26:48] marcel at zwerfkei dot nl
no comment
------------------------------------------------------------------------
[2008-01-29 15:24:29] marcel at zwerfkei dot nl
Description:
------------
I have troubles with the next script. I check the post with Firebug in
Firefox and the script is sending the post but it receive no data.
I have write the script for Ajax but also in php (see example).
Reproduce code:
---------------
<form action="'.$_SERVER['PHP_SELF'].'" method="POST"
enctype="multipart/form-data">
<input type="checkbox" value="0" name="thema[]" />0<br
/>
<input type="checkbox" value="1" name="thema[]" />1<br
/>
<input type="checkbox" value="2" name="thema[]" />2<br
/>
<input type="checkbox" value="3" name="thema[]" />3<br
/>
<input type="hidden" value="check" name="check" />
<input type="submit" value="verzend" />
</form>
Expected result:
----------------
The hidden field check is do the right thing. So the POST function is
working.
if(!empty($_POST['thema'])){
print_r($_POST['thema']);
}
I also tried:
foreach($_POST['thema'] as $post){
echo $post;
}
both results are empty.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=43966&edit=1