#23829 [Opn->Bgs]: header ("Location: test.php?this=5&that=6#goToThisBookmark"); err with bookmark
| From: | rasmus@php.net | Date: | Tue, 27 May 2003 14:29:29 +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-40501@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:
No, I don't think you understand. If the browser actually sends this
anchor data, by encoding it, or by whatever means, then PHP is bound to
show this to you. PHP could not possibly take that bookmark data and
scroll the page to the appropriate place for you. That's a client-side
function. And by the way, I tested this on IE 6.0.2800.xxx and it
doesn't happen with that browser.
Previous Comments:
------------------------------------------------------------------------
[2003-05-27 09:09:21] MDonatas at centras dot lt
I am using IE 6.0.2600.0000
Tried the same with Netscape Communicator 4.7 and it worked remarkably
well.
BUT! This issues has just been tested with ASP, and it worked, all
variables were sent as they should have been sent and the page scrolled
to the right bookmark.
SO, there is something on your end too.
------------------------------------------------------------------------
[2003-05-27 08:47:24] rasmus@php.net
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.
------------------------------------------------------------------------
[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