Forum Moderators: coopster
I have a website www.the-snakepit.com. At the top of each page I am including navigation.php, which includes the logo in the top left corner. For one page, I'd like to use a different logo but I still want to just include the navigation.php page. Is there any way I can say "if you're on this page, use this logo image"?
Any help is appreciated.
Regards,
Marshall
//mypage.php
$myimage= 'something.jpg';
include('files/navigation.php');
and in navigation.php
//navigation.php
echo '<img src="' . $myimage . '" />';
If on your base page you set your image, and then call it on the navigation page you can define different images for different pages. This is the simplest example I could think of. You could alsom, if you need to, do some detection of the current page using $_SERVER['PHP_SELF'] or one of the other internal variables to determine what image should be used.