Hey peeps,
I am familiar with PHP but have never properly coded with it and I was wondering if I could get some help with a code I’m trying to get to work.
I'm design my first site with elements of php, mainly just using include() to call pages and so on, however, I want to make the nav (which is in the index.php) to respond to whatever page is being called. I want it to work, so that when someone click a link, and visits a page, that link becomes inactive. I'm not getting any errors anymore, and at its present state, the link is constantly inactive, no matter where I am on the site.
Anyway, here's my code for the link.
and in the "home" page, I have the following to identify it.PHP Code:<?php
if ($page="home")
{
?>
<img src="site_imgs/home_but_b.jpg" alt="HOME" name="home_link" width="64" height="25" border="0" id="home_link" />
<?php
}
else
{
?>
<a href="index.php?page=home" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('home_link','','site_imgs/home_but_b.jpg',1)"><img src="site_imgs/home_but_a.jpg" alt="HOME" name="home_link" width="64" height="25" border="0" id="home_link" /></a>
<?php
}
?>
As im sure you can see from there, I have rollover images as links, and I want the link, once clicked, to show the over image.PHP Code:<?php
$page = "home";
?>
I'm not even 100% sure that I am going about this the right way, so if anyone can either help me get this to work, or can show me an easier or better way to do it, it'd be much appricated.
Thanks.





Bookmarks