#22626 [Fbk->Opn]: POST'ing an Array (<input name="checkbox[70]">) gives string 'Array'
| From: | cyborg at driverheaven dot net | Date: | Mon, 10 Mar 2003 23:09:27 +0000 |
| Subject: | #22626 [Fbk->Opn]: POST'ing an Array (<input name="checkbox[70]">) gives string 'Array' | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-35301@lists.php.net to get a copy of this message | ||
ID: 22626
User updated by: cyborg at driverheaven dot net
Reported By: cyborg at driverheaven dot net
-Status: Feedback
+Status: Open
Bug Type: *General Issues
Operating System: Windows 2003 Server
PHP Version: 5CVS-2003-03-10 (dev)
New Comment:
It appears to have been my problem, as I wasn't checking for whether
the variable was an array or string, and attempting to stripslashes()
if magic_quotes_gpc was enabled.
/me smacks head for being an idiot.
(Although there was no problems with it on PHP >= 4.1.0)
Previous Comments:
------------------------------------------------------------------------
[2003-03-10 14:07:59] derick@php.net
Please show us the script in which you do the print_r().
Derick
------------------------------------------------------------------------
[2003-03-10 13:17:26] cyborg at driverheaven dot net
when posting information through a form, using an array for a name,
example:
4 inputs: <input name="checkbox[70]" type="checkbox" />
(where 70 is different for each input, according to the messageid)
PHP gives the value 'Array' for $_POST['checkbox'], and it is a string,
as print_r() displays 'Array', and is_array() returns false on check.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=22626&edit=1