ID: 27019 User updated by: eadwint at fastmail dot fm Reported By: eadwint at fastmail dot fm Status: Closed Bug Type: Variables related Operating System: Win2K PHP Version: 4.3.5RC1 New Comment:
Found a fix.... register_globals is set to off in later versions....by default. Previous Comments: ------------------------------------------------------------------------ [2004-01-23 09:22:23] eadwint at fastmail dot fm Found a fix.... register_globals is set to off in later versions....by default. ------------------------------------------------------------------------ [2004-01-23 09:09:56] eadwint at fastmail dot fm The latest snapshot i've loaded is 4.3.5RC2 I am fairly confident I've missed something but I would really like some guidance. ------------------------------------------------------------------------ [2004-01-23 08:58:27] eadwint at fastmail dot fm Description: ------------ PHP_SELF is doesn't seen to be visible in view source When I press submit it doesn't seem to do anything! I looked into it on the php site and found a bug (Bug #21261 and 4060 http://bugs.php.net/bug.php?id=21261). I then downloaded and installed the latest php snapshot (4.3.5RC1)but the problem persists. As a person fairly new to development I'm a bit stumped, have you any suggestions? The closure details of 4060 "Fixed by Frank in CVS" are insufficient for me to know what to do next. Reproduce code: --------------- <html> <body> <?php if ($submit) { // process form while (list($name, $value) = each($HTTP_POST_VARS)) { echo "$name = $value<br>\n"; } } else{ // display form ?> <form method="post" action="<?php echo $PHP_SELF?>"> First name:<input type="Text" name="first"><br> Last name:<input type="Text" name="last"><br> Address:<input type="Text" name="address"><br> Position:<input type="Text" name="position"><br> <input type="Submit" name="submit" value="Enter information"> </form> <?php } // end if ?> </body> </html> Appears as follows when I view source: <html> <body> <form method="post" action=""> First name:<input type="Text" name="first"><br> Last name:<input type="Text" name="last"><br> Address:<input type="Text" name="address"><br> Position:<input type="Text" name="position"><br> <input type="Submit" name="submit" value="Enter information"> </form> </body> </html> Expected result: ---------------- A display of the variables placed in the form displayed on screen when submit button is pressed. Actual result: -------------- The form resets itself and data entered is lost. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=27019&edit=1