Bug #66723 [NEW]: Translation of Postdata at <input type="image" ... >
| From: | tschmieder at online dot de | Date: | Sun, 16 Feb 2014 09:56:13 +0000 |
| Subject: | Bug #66723 [NEW]: Translation of Postdata at <input type="image" ... > | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-184320@lists.php.net to get a copy of this message | ||
From: tschmieder at online dot de
Operating system: Linux, Windows, ...
PHP version: 5.4.25
Package: *Programming Data Structures
Bug Type: Bug
Bug description:Translation of Postdata at <input type="image" ... >
Description:
------------
I often prefer to use for input elements namestrings in array notation,
similar to
echo '<input type="image" src="/img/lupe.gif"
name="btn[show][' . $id .
']">';
This is very handy, unfortunately it doesn't work when Input-Type =
Image.
Result will be:
Array
(
[btn] => Array
(
[show] => Array
(
[3] => 9
)
)
)
Looking into the http-transfer, everything is still ok:
Content-Disposition: form-data; name="btn[show][1].x"
Content-Disposition: form-data; name="btn[show][1].y"
Due to the "point substitution" in combination with the array spelling,
the x-coordinate will be replaced by the y-coordinate
Expected result:
----------------
I would be glad, if for further PHP-Versions the result could be:
(
[btn] => Array
(
[show] => Array
(
[3] => Array
{
[x] => 9
[y] => 27
}
)
)
)
For compatibility reasons, the translation for simple names perhaps
should remain the same
<input type="image" name="image" ... >
becomes furthermore to
$_POST['image_x'] = 9
$_POST['image_y'] = 27
--
Edit bug report at https://bugs.php.net/bug.php?id=66723&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=66723&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=66723&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=66723&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=66723&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=66723&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=66723&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=66723&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=66723&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=66723&r=support
Expected behavior: https://bugs.php.net/fix.php?id=66723&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=66723&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=66723&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=66723&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=66723&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=66723&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=66723&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=66723&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=66723&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=66723&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=66723&r=mysqlcfg