Nope, all the headers are on both pages.
If I open the included file straight away on the internet everything works just fine, the way it should. But this all stops as soon as it is loaded from the other page using the include.
What I’m basically trying to achieve:
I have a page messages.php which has a div filled with messages.
Just this div needs to be refreshed every 5 minutes, all other elements on the page doesn’t. So just the DIV. I tried couple of things.
I’ve tried to put
[php][/php]
on top of a page called messages_inside.php and load this page on messages.php using
[php]<?php include 'messages_inside.php';?>[/php]
but this still makes it refresh the whole page, all elements and not just the div.
I’ve also tried
[php][/php]
and put an empty div on the page
[php]
[/php]
this loads the page correctly, but it takes 3000 ms before it displays the messages (so it waits 'till it’s refreshed for the first time and than all messages are shown).
I can avoid this by putting in the same
[php]<?php include 'messages_inside.php';?>[/php]
inside this div, so it will look like
[php]
<?php include 'messages_inside.php';?>
[/php]
this offers a solution for the displaying error (so it is visible at the first time and keeps refreshing) but this kills some functions on the messages_inside.php
So,
what IS the easiest way to refresh just a div and not the whole page. It doesn’t matter if the messages are on the same page (directly in the div) or will be loaded using an include code. One page, two pages, doesn’t matter, as long as just the messages are refreshed every 5 minutes and all other elements stay untouched.
I tried multiple options, all doesn’t offer me the way I want it to.