Silver89
Nov 13th 2006, 3:22 am
Ok, i have a site funzac.com/sitec which is for a school project.
I need the links at the top to have the css mouseover applied if it is on that current page.
To do this i figured i would need to get the url with php and then have something in the link style to tell it if 1 do and if 0 display normal.
this is as far as i got before i completly mind blanked
<?php
$url = $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'];
?>
<div class="header">
<a href="index.php"><img class="image" src="images/homepage.png" width="500" height="80"/></a>
<div class="navigation">
<a style="<? if{$url == href ?>" href="index.php">Home</a>
<a href="about.php">About</a>
<a href="contact.php">Contact</a>
<a href="hours.php">Hours</a>
<a href="location.php">Location</a>
<a href="services.php">Services</a>
</div>
</div>
I need the links at the top to have the css mouseover applied if it is on that current page.
To do this i figured i would need to get the url with php and then have something in the link style to tell it if 1 do and if 0 display normal.
this is as far as i got before i completly mind blanked
<?php
$url = $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'];
?>
<div class="header">
<a href="index.php"><img class="image" src="images/homepage.png" width="500" height="80"/></a>
<div class="navigation">
<a style="<? if{$url == href ?>" href="index.php">Home</a>
<a href="about.php">About</a>
<a href="contact.php">Contact</a>
<a href="hours.php">Hours</a>
<a href="location.php">Location</a>
<a href="services.php">Services</a>
</div>
</div>