|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[1999-10-29 16:34 UTC] rasmus at cvs dot php dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Dec 19 21:00:01 2025 UTC |
Maybe a Netscape or a PHP3 bug? This short code should echo "1" on every submit, because after Header() the program shouldn't run and do anything. On MSIE, lynx, and on 3 Amiga browsers it works fine, but on "all" type and versions of Netscape it displays "2". The problem can easily be solved by adding a parameter to the $PHP_SELF like this: Header("Location: $PHP_SELF?foo=bar"); The code: <? $var=1; if (isset($butt)) { Header("Location: $PHP_SELF"); $var=2; } ?> <html> <head> </head> <body> <form method="post" action="<?echo$PHP_SELF?>"> <?echo $var?> <input type="submit" name="butt" value="OK"> </form> </body> </html>