Ok, you may try getting it from the query string, like so:
menu.php
PHP Code:
<?php
if(isset($_GET['page'])){
$page = $_GET['page'];}
else{
$page = 'home';}
$home = '';
$faq = '';
$analysis = '';
$test = '';
$contact = '';
$current = ' id="current"';
if($page == 'home' || $page == 'faq' || $page == 'analysis' || $page == 'test' || $page == 'contact'){
$$page = $current;}
else{
$home = $current;} ?>
<div id="Layer1" style="z-index: 1; left: 10px; height: 140px; position: absolute; top: 0px">
<img height="140" src="http://euphoriastudio.freehostia.com/header1.png" width="800" />
</div>
<div id="tabs" style="z-index: 5; left: 0px; position: absolute; top: 109px; height: 31px;">
<ul>
<li<?=$home?>><a href="http://euphoriastudio.freehostia.com/tmst.shtml" title="Home"><span>Home</span></a></li>
<li<?=$faq?>><a href="http://euphoriastudio.freehostia.com/test.shtml" title="FAQ"><span>FAQ</span></a></li>
<li<?=$analysis?>><a href="http://euphoriastudio.freehostia.com/test.shtml" title="Analysis"><span>Analysis</span></a></li>
<li<?=$test?>><a href="http://euphoriastudio.freehostia.com/test.shtml" title="Testimonials"><span>Testimonials</span></a></li>
<li<?=$contact?>><a href="http://euphoriastudio.freehostia.com/test.shtml" title="Contact Us"><span>Contact Us</span></a></li>
</ul>
</div>
Now, when you link to a cerain page that you wish to display a particular tab as highlighted/current, you would do this, say for the FAQ page:
faq.php?page=faq
What the code does is it pulls what page equals from the query string (the url). If page does not exist, it defaults to the page being home. So, for the Home page you can just leave the page=home part out since that's what it will show anyway. Next, we create the variables we'll be using later. Then, we make sure that if page does equal something, that it equals one of the pages that exist. If it does, we set that page's variable to $current, which equals the id 'current'. Thus, each variable we originally created still equals nothing and the one that was specified in the url as page will be highlighted as the current page.
There may be a more correct way, maybe even easier way, to do this. But this way isn't too difficult and it should work. If you have any problems or need any more help, let me know.
Thou com'st in such a questionable shape
Hamlet, Act 1, Scene 4
Bookmarks