#23829 [Opn->Bgs]: header ("Location: test.php?this=5&that=6#goToThisBookmark"); err with bookmark
| From: | rasmus@php.net | Date: | Tue, 27 May 2003 13:47:25 +0000 |
| Subject: | #23829 [Opn->Bgs]: header ("Location: test.php?this=5&that=6#goToThisBookmark"); err with bookmark | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-40496@lists.php.net to get a copy of this message | ||
ID: 23829
Updated by: rasmus@php.net
Reported By: MDonatas at centras dot lt
-Status: Open
+Status: Bogus
Bug Type: *URL Functions
Operating System: Windows 2000 Server
PHP Version: 4.3.1
New Comment:
Looks like a browser bug to me. Which browser are you using?
Browsers don't actually send the #foo across the wire, they simply
remember it and scroll down to the location of the <a name> tag when
they find it.
Previous Comments:
------------------------------------------------------------------------
[2003-05-27 08:37:30] MDonatas at centras dot lt
I'll make it clear with 3 small webpages in my example on how to
reproduce this bug.
*******test1.php********
<html>
<head>
<title></title>
</head>
<body>
<a href="test2.php">Go to test2.php</a>
</body>
</html>
************************
*******test2.php********
<?php
header ("Location: test3.php?this=5&that=6#MyBookmark");
?>
************************
*******test3.php********
<html>
<head>
<title></title>
</head>
<body>
<?php
var_dump ($HTTP_GET_VARS);
?>
</body>
</html>
************************
Now, first part of the test:
Run test2.php so you would get redirected to test3.php
OUTPUT in test3.php :: array(2) { ["this"]=> string(1) "5"
["that"]=>
string(1) "6" }
Everything is fine here, now second part of the test.
Run test1.php and click on the link to go to test2.php and instantly
get redirected to test3.php
OUTPUT in test3.php :: array(2) { ["this"]=> string(1) "5"
["that"]=>
string(12) "6#MyBookmark" }
See, there is bookmark thingy attached at the end as if it is a part of
my second variable sent over GET vie the link.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=23829&edit=1