you know when you have a search engine, and you want to apply filters, and sort stuff by given parameter?
if you simply make this:
Code: Select all
<a href="?filter1=low">low prices</a>
<a href="?filter2=best">best rated</a>
my workaround for this so far:
Code: Select all
<a href="?filter1=low&filter2=<?php echo $_GET['filter2']; ?>">low prices</a>
<a href="?filter2=best&filter1=<?php echo $_GET['filter1']; ?>">best rated</a>
so i was trying to figure out a way to simply add variables to a $url variable, like if $_GET[variable] is set, $url.="add variable", and if that variable is already set, replace if its different, or keep if its equal, but i dont know if thats possible cuz i didnt manage to make it.
is it doable?
thanks in advance!