Forum Moderators: coopster
basically i have my script. the very first thing is a function that removes the query string from the url by using:
header("Location: [".$HTTP_HOST.$PHP_SELF);...]
that is the very first command in the script. i use an IF around it so its not infinitly looping. i want to let it finish running the script so i don't break it. from what i understand it should just finish running the code as if nothing has happened. but it doesn't...i set some variables and arrays AFTER the header() and they don't work. some do, some don't, i can't find a pattern. sometimes it will even show an empty array when i do print_r(), but when i loop through using foreach() it goes through all the keys and values that were supposed to be there just fine. If i comment the header() line the script works just fine, it just doesn't remove the query string like i want.
I get the same results with 4.4 and 5.2
see the php manual about the function for more details
[uk2.php.net...]
:)