OK this is probably simple but here goes.
I have a parsed URL ( www.foo.com?bar=1).
It is being used as part of a search function and an SQL query is built from this variable ( SELECT * from foo WHERE bar=$bar).
I have a link on that page which will narrow down the results ( SELECT * from foo WHERE bar=$bar AND cheese=1).
However if I have the link as <a href=".$_SERVER[‘PHP_SELF’]."&cheese=1> the PHP_SELF ignores the bar variable already in the URL.
Is there a way to include it without having if statements on each link to check if $bar exists?