Page 1 of 1

Passing HTML anchors from PHP

Posted: Thu Mar 18, 2004 7:29 am
by verbetex
Hi

I've got a PHP script file that does some processing, and when done, I set the header location like so:

header("Location: ../" . $address);
Where address would be something like "mypage.phtml#end"

In the phtml file, I have <a name="end"></a>

This works in Mozilla Firebird, but doesn't work in IE (The #end seems to be getting stripped off the url) :evil:

Anyone come across this before or know of a workaround?

Cheers

Re: Passing HTML anchors from PHP

Posted: Thu Mar 18, 2004 11:33 am
by TheBentinel.com
If you use a full path in the Location:, does it work?

Change:
header("Location: ../mypage.phtml#end");

To:
header("Location: http://yourserver.com/mypage.phtml#end");

See if that has any effect on it.

Does mypage.phtml do any sort of redirection itself?

Do you have a mod_rewrite in your .htaccess file?