Greets ...
Thanks for the reply ...
The answer to the question is to use the PHP function header() just as it was described in the PHP documentation.
The answer to your question is:
If I had wanted to use post, I would have :-)
Also:
That doesn't help me take a link the user clicked on, and change it before it gets back to the browser.
The whole thing is a system to add a "my" thing to my site. I have a left nav bar ... it has headers and then stuff under those headers ... it's rather long.
I want them to be able to "hide" or "show" the content of those headers with a single click. Some of the pages have pretty complex query strings ...
The way to do this with a query string is to append, or prepend the current query string of the page with a couple of fields that will adjust the users cookie and utlitimately affect the display of the page.
The problem is that PHP3 and PHP4 treat query strings differently ... and I have both pages on my site ... and I want this to be a universal function ...
if argv[] worked the same in both versions ... I could have simply appened my stuff at the end ... put a function in the common.inc file (a file that gets included on every page in the site) ... counted the argv (or used argc) ... check the last 2 places ... if they were mine, then execute.
The problem with this whole scenario is ... that once those fields are appended to the QUERY_STRING ... they stay ... and when the page is refreshed ... my links would add yet another 2 fields to the end of those links ... and again, and again, and again.
So ... part of the function needs to be to alter the query string so that it doesn't have my just recently appened 2 fields ... so that I can append 2 new fields.
If argv[] worked ... I could have reassembled those 2 fields ... then found a way to put that query string back out.
If you check the threads ... earlier I put up a question about PHP3 and PHP4 query strings.
Anyways ... with the function of Header() ... I can "pre-pend" my 2 fields ... then easily strip them from the query string ... and not have to worry about PHP3/PHP4 handling of argv and strings in general ... then push the newely edited URL/QUERY_STRING back out to the browser ... where of links with pre-pended links will be created.
David Carter
www.battlestats.com