title: Javascript Countdown Timer Repeat and execute php code
body: <p>i have javascript countdown timer from 30 -> 0.</p>
  
  <pre><code>var count = 30;
  
  var counter = setInterval(timer, 1000);
  
  function timer() {
    count = count - 1;
    if (count &lt;= 0) {
      clearInterval(counter);
      return;
    }
  
    document.getElementById("timer").innerHTML = count;
  }
  </code></pre>
  
  <p>and html : </p>
  
  <pre><code>&lt;span id="timer"&gt;30&lt;/span&gt;
  </code></pre>
  
  <p>I want the countdown to repeat automatically when it is over (after 30 secs) and  execute php code (Select and show data from mysql)</p>