Page 1 of 1

removing query string

Posted: Wed Sep 29, 2004 3:19 pm
by newmember
Lets say user clicks on link with query string...browser sends request to server and server executes my php code...
what i want to do is to remove query string so the browser won't display it when document is sent to it...

I was thinking to take $_SERVER['REQUEST_URI'], remove from it the query string and then send modified Location header (with same $_SERVER['REQUEST_URI'] but without query string)
but i'm not sure it is a correct way to do this...

can someone confirm or suggest something else?
thanks

Posted: Wed Sep 29, 2004 4:24 pm
by John Cartwright
I believe that would require another refresh...

may I ask why you don't want to show the query string?
Sounds like poor design and an unnecesary head ache

Posted: Wed Sep 29, 2004 4:57 pm
by newmember
yes i have just started with php
basicly i have a dynamic menu and i want to remember it's state while user goes back and forth...
here is a thead where i asked advice: viewtopic.php?t=26280
at first i thought js will be enough but it is not...
so now i'm using combination of js and sessions to get it done perfectly.js tracks the client actions and sends menu states to php script, the later saves the menu state in session variable, and initializes menu state when page with menu requested...

so what i wanted is to remove from query string the status parameter of menu(which is set by js)