RE: [PHP] Image problem
| From: | Michael O'Neal | Date: | Tue, 15 May 2001 22:42:13 +0000 |
| Subject: | RE: [PHP] Image problem | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-52949@lists.php.net to get a copy of this message | ||
On Tue, 15 May 2001 10:23:39 -0700, "Jerry Lake" <jerryl@europa.com>
wrote:
>This is how I fixed that same issue
>in the head of my page
><snip>
>if (ereg ("new", $PHP_SELF)) {
> $header = "<img src=location/of/header/image";
> $title = "www.website.com - What's New"; }
>elseif (ereg ("products", $PHP_SELF)) {
> $header = "<img src=location/of/header/image";
> $title = "www.website.com - Products"; }
>else {
> $header = "<img src=location/of/header/image";
> $title = "www.website.com"; }
></snip>
>
>then call the header in in the appropriate place in
>your html <? echo $header; ?>
Thanks Jerry.
This is what I ended up going with, (Thanks to Josh Hoover) and it works
great!
switch(true)
{
case (stristr($REQUEST_URI, "/about/")):
$headerImage = "/images/hdr_txt_about.gif";
$footerImage = "/images/ftr_txt_about.gif";
break;
case (stristr($REQUEST_URI, "/news/")):
$headerImage = "/images/hdr_txt_news.gif";
$footerImage = "/images/ftr_txt_news.gif";
break;
case (stristr($REQUEST_URI, "/buying/")):
$headerImage = "/images/hdr_txt_buying.gif";
$footerImage = "/images/ftr_txt_buying.gif";
break;
case (stristr($REQUEST_URI, "/selling/")):
$headerImage = "/images/hdr_txt_selling.gif";
$footerImage = "/images/ftr_txt_selling.gif";
break;
case (stristr($REQUEST_URI, "/community/")):
$headerImage = "/images/hdr_txt_community.gif";
$footerImage = "/images/ftr_txt_community.gif";
break;
case (stristr($REQUEST_URI, "/relocation/")):
$headerImage = "/images/hdr_txt_relocation.gif";
$footerImage = "/images/ftr_txt_relocation.gif";
break;
}
Then, just called $headerImage, and $footerImage in the appropriate
places.
Thanks to all!
mto
Michael O'Neal
Web Producer/ Autocrosser
ST 28 '89 Civic Si
---------------------
M A N G O
B O U L D E R
---------------------
http://www.thinkmango.com
e-mike@thinkmango.com
p-303.442.1821
f-303.938.8507