php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #11097 HTML Form Variable Error
Submitted: 2001-05-24 16:40 UTC Modified: 2001-05-24 17:00 UTC
From: brw at brw dot net Assigned:
Status: Not a bug Package: HTTP related
PHP Version: 4.0.5 OS: Linux 2.4 kernel
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: brw at brw dot net
New email:
PHP Version: OS:

 

 [2001-05-24 16:40 UTC] brw at brw dot net
After messing with some PHP functionality, I decided that I wanted an input field to be named like the following.

func[name]

the HTML looks like this.

<input type="hidden" name="func[name]" value="blah()">

The unfortunate thing is that PHP treats the name func[name] as an array.  I.e., $func.

If this is supposed to act like this then ok, but I would guess this would not be a good idea.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-05-24 17:00 UTC] cardinal@php.net
No, this is quite intentional.

For example, if you wanted to use a <select multiple> list, name it "list[]", and all the options that get selected will go into the array.
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Fri Jul 23 14:01:24 2021 UTC