I have a strange issue. It almost seems like a bug.
if ($object->error) {Form::BuildReturn(); header ("location:$url");}
Now if I echo the value of $url, I get the correct value: /projects/view/112/?edit-note=105
But when the script executes, it takes me to /projects/view/112/.
Here's the weird part though: I can try to echo or print something right after the header and then it will take me to /projects/view/112/?edit-note=105 like I want it to. Example:
if ($object->error) {Form::BuildReturn(); header ("location:$url"); echo 0;}
I've tried searching this for about half an hour now using terms like 'PHP header query string', 'PHP header get values', and so on. I hope there is some actual solution to this rather than using a hacky workaround that generates 'cannot modify header information' warnings...
header("Location:...")doesn't accept Get variables. Does it work if you directly write "/projects/view..." in PHP instead of $url? Maybe you could try addingexit;after the redirection if it works with echo.exit;... that worked. Thank you. If you post that as an answer I will accept it.http://example.com/..-- Also show awget -Sor Firebug header dump. Also likely you have multiple header() calls in your code, one overwriting the more specific.