Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

steelphantom

macrumors 6502a
Original poster
Oct 15, 2005
555
1
Some of you guys might have already seen the site I've been working on lately, http://www.theleafsband.com/. Thanks for your feedback and assistance!

The site is (at least for now) functionally complete. However, I'd like to make a little behind-the-scenes change to make any future design changes easier. As you probably noticed, the green navigation bar on site highlights which section of the site you're visiting. I'd like to include the navbar in my header.php file, but have it still highlight the current section of the site (e.g. if you're on the band.php page, the "Band" section of the navbar will be highlighted).

I'm thinking the best way to do this is to somehow check the current URL with PHP and then make a decision on which link gets the highlight. Unfortunately, I'm not exactly sure how to implement this. I'd imagine it's not too difficult. Any suggestions or ideas? Thanks! :)
 
Ah, I figured it out. $_SERVER['REQUEST_URI'] was what I was looking for. Thanks!
 
also just search for PHP GET URL.. there are some cleaner options out there than what i posted i think...
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.