How to Send Mutiple $_Gets ???

Hello All, I’m having trouble figuring this one out.
I have a page that does a standard query to a MySQL database. (This works fine)
Then I have some <if’s> that change the query based on $_GETS

if($_GET[view] == "resolved") {$mylink = $_SERVER[PHP_SELF];} else { $mylink = $_SERVER[PHP_SELF]."?view=resolved"; }
if($_GET[expand] == "yes") {$mylink2 = $_SERVER[PHP_SELF];} else { $mylink2 = $_SERVER[PHP_SELF]."?expand=yes"; }

These <if’s> work fine. =)
I have links on the page that will set the $_GET to view=resolved or expand=yes.

My Problem:
How to get the page to remember my first selection?
I click the index.php?view=resolved link and I get just that.
I click the index.php?expand=yes link and I get that BUT loose the view=resolved

I need the page to remember my first selection so I get somthing like this - index.php?view=resolved&expand=yes

Any Tips,Tricks or Critiques Welcome
Thank you for your time!

Not sure if $_SERVER[PHP_SELF] returns the url including the query string, but $_SERVER[QUERY_STRING] (or something similar to that) should give you the current query string. Simply check that one for current $_GET variables and append any additional variables.

Sponsor our Newsletter | Privacy Policy | Terms of Service