Hello all,
I have a problem that is driving me crazy and I know it has to be a lot easier then the way I am trying to do it. (with no success).
I am trying to load a highlighted "home" button in my naviagation bar so that it will display only if you are on the root home page. If a visitor is not on the homepage, a grayed out "home" image
will show. Can someone look at this code and post how I could fix it so that the highlighted version of the home button loads ONLY on the root/index.php page? and not on any other directory "index.php" page?
function home_button()
{
global $BASE_URL;
if (strpos('$_SERVER[SERVER_NAME]$_SERVER[PHP_SELF]',"www.domain.com/index.php")!==false)
{
return "<a href='$BASE_URL'><img src='$BASE_URL/img/welcome_on.gif' border=0 align=absbottom></a>";
} else
return " $_SERVER[SERVER_NAME] <a href='$BASE_URL'><img src='$BASE_URL/img/welcome_off.gif' border=0 align=absbottom></a>";
}
Thanks