reload div with javacript containing php content
<p>I have seen a lot of questions like this, but they don’t seam to answer my question.</p>

<p>I have a php page with this structure:</p>

<pre><code>&lt;?php
include 'header.php';
include 'content.php';
include 'footer.php';
?&gt;
</code></pre>

<p>In the header.php I have a function that counts some rows in a database</p>

<pre><code>$show =$mysql-&gt;count('someparam', $foo['bar']);
   if ($show &gt; 0) {
       echo $show;
   }
</code></pre>

<p>Thats all good. Now in the content.php file the user can do operations that changes this $show value in the header. But I need to reload the page to see the updated $show number.</p>

<p>I want to solved this with javascript, but cant figure out how to do it.</p>

<p>I tried solving it with a javascript reload on timer, like this:</p>

<pre><code>&lt;script&gt;
function render (){
$('.customer-database').html(.customer-database)
}
window.setInterval(render, 500);
&lt;/script&gt;
</code></pre>

<p>the $show counter is inside the div class costumer-database. This is not working because I need to put html code in after the html(, but I don’t want to put HTML code in, I simply want to reload it.. Is this possible?</p>

<p>I am open to any suggestions both javascript and php.</p>
