include () problems including footer and header.

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
synergytheory
Forum Newbie
Posts: 3
Joined: Thu Oct 09, 2003 11:12 am

include () problems including footer and header.

Post by synergytheory »

Hi,

First post, nice forum! I hope to frequent it as I learn php/mysql.

I have a header.html file and a footer.html file, both loading within a html table with include ().
When I test it with the header being included, my rollover images within the header.html file work, but when I add the footer file [which also has rollover images], they both stop working.

I am using a simple piece of code.

<?php
include 'header.html';
?>

Any ideas how I can get around this? Is it because I have them within a table? I really need the table.
Oh, and I tried SSI includes also, the exact same thing happens, header works, when I put the footer in they both won't load my rollovers.

Thanks.
qads
DevNet Resident
Posts: 1199
Joined: Tue Apr 23, 2002 10:02 am
Location: Brisbane

Post by qads »

rollovers are done with javascript, noting to do with php..you should check that out. post some code from header and footer..around the rollovers maybe.
synergytheory
Forum Newbie
Posts: 3
Joined: Thu Oct 09, 2003 11:12 am

Post by synergytheory »

qads wrote:rollovers are done with javascript, noting to do with php..you should check that out. post some code from header and footer..around the rollovers maybe.
I understand this, and the header.html file when loaded by using PHP, i.e include 'header.html'; by ITSELF, the rollover images work fine, but when I add the footer.html file, the header.html rollover files ceases to work, and also the footer.html rollovers don't work either.
User avatar
mrvanjohnson
Forum Contributor
Posts: 137
Joined: Wed May 28, 2003 11:38 am
Location: San Diego, CA

Post by mrvanjohnson »

You have some conflicting logic somewhere. Try this, simply put the logic for the header and footer on the same page. Eliminate PHP or any SSI and just create a HTML page with the header and footer. Does it work?? If not then you need to look close at how you have them configured. With out seeing any code it's hard to trouble shot.

If it does work then let us know that too.
synergytheory
Forum Newbie
Posts: 3
Joined: Thu Oct 09, 2003 11:12 am

Post by synergytheory »

mrvanjohnson wrote:You have some conflicting logic somewhere. Try this, simply put the logic for the header and footer on the same page. Eliminate PHP or any SSI and just create a HTML page with the header and footer. Does it work?? If not then you need to look close at how you have them configured. With out seeing any code it's hard to trouble shot.

If it does work then let us know that too.
quads was on the right path, javascript uses name attributes for the roll overs, I named my roll over attributes the same on my header and footer, changed them and it now it's working like a charm!

SO it was js and not php, I have no idea why I thought it was php. To early for my brain.

Thanks for the help.
Post Reply