php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #29721 Dynamic variables wrong after a POST
Submitted: 2004-08-17 15:35 UTC Modified: 2004-08-18 10:52 UTC
From: me at autourdupc dot com Assigned:
Status: Not a bug Package: Variables related
PHP Version: 4.3.8 OS: Windows
Private report: No CVE-ID: None
 [2004-08-17 15:35 UTC] me at autourdupc dot com
Description:
------------
Using dynamic variables.

After a POST, variables initialized with a NULL value are not NULL.



Reproduce code:
---------------
http://www.autourdupc.com/bug.php.txt



Expected result:
----------------

If you enter a value in the first field and leave others blank.

After the post, only the first value must have the value. 

Actual result:
--------------

Actually, all the variables have the same value.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-08-17 15:42 UTC] tony2001@php.net
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. 

Thank you for your interest in PHP.

Use var_dump($_POST); and you'll see that variables are on their places.
Debug you code.
 [2004-08-18 09:55 UTC] me at autourdupc dot com
I use var_dump($_POST);

I think you do not understand my request.
Error message displayed are good.

The problem is that I put a value on the first field and after the POST all others fields are filled with this same value. Normally, thez should be empty or on error.

I think there is a bug :
If you put "a" on the first field, all the post displayed by the var_dump are good but the values displayed by the dynamic construction of the variables are wrong.

I don't understand why the result is correct is I use a static name for my variables and the result is different if I use a dynamic name.

Please try again my example and see !

May be it is not a bug concerning the POST but a bug concerning dynamic variables.
 [2004-08-18 10:52 UTC] mgf@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

There *is* a bug in your code, so the bug system is not the place to dsicuss this.  Post your problem (and your failing code) to the php-general list, and someone (maybe even me!) might help out.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue Jul 29 03:00:02 2025 UTC