Bug #2636: Incomprehensible Header() behaviour

From: Date: Fri, 29 Oct 1999 10:17:21 +0000
Subject: Bug #2636: Incomprehensible Header() behaviour
Groups: php.dev 
Request: Send a blank email to php-dev+get-11998@lists.php.net to get a copy of this message
From: dobosgy@netcity.hu Operating system: Linux+Apache1.3.6 PHP version: 3.0.12 PHP Bug Type: Performance problem Bug description: Incomprehensible Header() behaviour 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>

« previous php.dev (#11998) next »