david4ie
New Member
Hey
I was wondering if anybody knows how to display an image based on the url of a website. I have one website running on two different domain names and I would like the logo to change bases on the url.
This is what ive got but it doesn't seem to work:
Thanks
I was wondering if anybody knows how to display an image based on the url of a website. I have one website running on two different domain names and I would like the logo to change bases on the url.
This is what ive got but it doesn't seem to work:
PHP:
<?php
$url = $_SERVER['HTTP_HOST']
if ( $url = 'www.example.com')
{
echo "<a href=\"/\"><img src=\"img/logo.gif\" border=0></a>";
}
else if ( $url = 'www.example2.com' )
{
echo "<a href=\"/\"><img src=\"img/logo2.gif\" border=0></a>";
}
?>