go to bug id or search bugs for
This bug affects how variables are parsed from the URL, in instances when the header() function is used to forward the browser. Eg. if the following code was used in a script:
Then index.php would be parsed and PHP would assign $variable == blah. However, if the user adds a HTML anchor reference onto the end, eg:
Then the web browser would still parse it fine, but PHP will assign $variable == blah#1. If the user refreshes the browser window (eg., the location header isn't being used to laod the script) then it works fine, so this bug is limtied to the header() function only.
The script writer can add an & before the # character in the URL, eg:
Add a Patch
Add a Pull Request
Can't reproduce. Try latest CVS build from http://www.php4win.de/
I get this bug too.
I can literally do;
success_box('Post Added', "index/thread/$tid/$pages#$pq->pid");[/php]
//redirects to [url]http://forumz.wuggawoo.co.uk/index/thread/5/5[/url]
//redirectrs to [url]http://forumz.wuggawoo.co.uk/index/thread/5/5#6890[/url][/php]
I tried the &# solution but it didnt work, it just goes to /&
Unon further inspection and testing the thing that knocks the header command out is a file field in the form.
Without a file field it forwards correctly, else it drops anchors.