From:             [EMAIL PROTECTED]
Operating system: Linux
PHP version:      4.2.3
PHP Bug Type:     Arrays related
Bug description:  Incorrect key value when POSTing array to script

Form:
<form action="script.php" method="POST">
<input name="variable" value="lost and found"><br>
lost: <input name="array[lost]" value="lost and found"><br>
'lost': <input name="array['lost']" value="lost and found"><br>
long key: <input name="array[testoflongkey]" value="lost and found"><br>
<input type="submit"><br>
</form>

script.php:
<?PHP
print_r ($_POST);
?>

When the form is submited (with "lost and found" string as input value)
the following output is displayed:

Array
(
    [variable] => lost and found
    [array] => Array
        (
            [lost] =>  and found
            ['lost'] =>  found
            [testoflongkey] =>  and found
        )

)

As you can see there are characters missing in result array.



-- 
Edit bug report at http://bugs.php.net/?id=20133&edit=1
-- 
Try a CVS snapshot:         http://bugs.php.net/fix.php?id=20133&r=trysnapshot
Fixed in CVS:               http://bugs.php.net/fix.php?id=20133&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=20133&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=20133&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=20133&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=20133&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=20133&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=20133&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=20133&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=20133&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=20133&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=20133&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=20133&r=isapi

Reply via email to