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; ?>

Jerry Lake
Interface Engineering Technician
Europa Communications - http://www.europa.com
Pacifier Online     - http://www.pacifier.com


-----Original Message-----
From: Michael O'Neal [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 15, 2001 10:14 AM
To: php
Subject: [PHP] Image problem


Hi,

I'm still pretty new to PHP, and would like help on a solution for a 
problem I have.

I have a website that has 6 different sections.  (about, news, buying, 
selling, community, and relocation)  Each of the sections has it's own 
subfolder in the root directory of the website.  (/about, /news, etc...)  
Each of the sections also has a header image and footer image associated 
with that section.  (hdr_txt_about.gif, ftr_txt_about.gif, 
hdr_txt_news.gif, etc..)

I want to use PHP to "know" what section of the website the user is in, 
and load the appropriate header/footer image.  I know that I need some 
sort of if/then statement, and I know that it has to use the URL to see 
where it is, but I don't know where to implement it, and I'm not quite 
sure how.  The website is setup with an included header that has most of 
the html/javascript, a mostly text file for the content, and an included 
footer that takes care of the rest.  

Any help with this would be greatly appreciated.

Thanks,

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
[EMAIL PROTECTED]
p-303.442.1821
f-303.938.8507



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to