What you want to do is something like(assuming we are on contacts.php and the link list looks like the follwing:
Home[link]
About me[link]
PHP[link]
Contacts[not a link, diffrent color]
Usaly I just leave it be and let people click the currently active link.
Now for the neatness of it all _
links.php:
<?PHP
//what links do we got here?
$links=array("home.php", "aboutme.php","php.php","contacts.php");
$offcolor="#FFFFFF"; //Color for link currently displayed
$currentpage=basename($_SERVER['PHP_SELF']) ; //Snipped wildly from your code.
foreach($links as $key=>$v) //Go through each value in $links array and print it.
{
if($currentpage!=$v) //If its not currentpage, it should be a link
{
print "<a href=\"$v\">$v</a><br />\n";
}
elseif($currentpage==$v)
{
print "<font color=\"$offcolor\">$v</font><br />\n"; //its currentpage, not link, diffrent color.
}
}
?>
The above should work(didnt test it) and is easily modified to suit your layout(i hope).
Then do this where your linksection is to have them displayed:
Links:
<?PHP
include("links.php");
?>
And voila, you can add links as you please and dont have to rewrite every page to add a new link to a new page _
Good luck.