Page 1 of 1

how do i use multiple HTTP vars along with internal links?

Posted: Mon Jun 14, 2004 5:00 am
by radioradio
i'm working on a dynamic schedule for a radio station and i have two variables passed to the page through the url. one controls whether the schedule lists shows by the show title or the dj and the other controls what genre of show gets highlighted.

right now i have links on the page which allow you to switch around the variables that get sent to the page. like this..

display by <a href="?display=dj">dj names</a> or <a href="?display=title">show titles</a>

and

show shows that are <a href="?genre=rock">rock</a> etc...

but when i click on the genre button to display rock shows i lose the ?display=dj part of the url. how can i keep both variables in the url through internal links?

thanks,

dan

Posted: Mon Jun 14, 2004 5:04 am
by feyd
echo "<a href=\"?genre=rock&{$_GET['display']}\">rock</a>";

Posted: Mon Jun 14, 2004 7:12 am
by magicrobotmonkey