I have two pages, header.php and sidebar.php which I want to include on several pages using:

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

However, there are two different issues.

On this page http://ewh.ieee.org/r1/schenectady/New/index.php , the included text is put BELOW the text on index.php, even thought it is included BEFORE the index.php text.

On this page http://ewh.ieee.org/r1/schenectady/New/events.php , you can see that the sidebar is "messed up" (the yellow part is much wider than it should be, and the table starts below the sidebar rather than to the right of it.

Any suggestions on how to fix these things?

Thanks!

David

Recommended Answers

All 3 Replies

Hi David.. Sorry.. I can't see your specified page.. Something restrict me to go on link.. Anyway, the suggestion is obviously whatever we include using include() function, that file should execute first, then only further instructions will execute. If you post the code, i will surely help you on this...

hi David.. Finally i got it... See, i mailed you the updated code... it works fine.. Suppose you feel any probs, pls let me know soon...

commented: Thanks for the help! Actually downloading my code and playing with/fixing it shows excellent effort! +4

Great, thanks Dragonbaki! For future readers, the problem was just with not properly closing tags of nested tables. The code was a mess so I don't think it's worth posting here.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.