Given this example url:
http://www.example.com/yourpage.php?s=item1&n=01
$_SERVER['REQUEST_URI']
will give you: yourpage.php?q=bogus&n=10
$full_url = $_SERVER['REQUEST_URI'];
now $url will carry only file name.
So in your menu
<ul>
<li><a href="home.php" class="<?php if($url=="home.php") {echo'active';}?>" >Home</a></li>
</ul>
Now it'll dynamically show the active menu.
Thanks