title: Javascript countdown timer + PHP code inside JS
body: <p>I need help with countdown timer in javascript.I found the code below in PHPJabbers. This code works fine, but when I reload the page the time goes back to its initial time. I want to retain the time even if I load the page. I want also to add PHP function inside if seconds == 0. I'm not sure if it's possible. Thanks in advance </p>
  
  <pre><code>&lt;span id="countdown" class="timer"&gt;&lt;/span&gt;
  &lt;script&gt;
  var seconds = 60;
      function secondPassed() {
      var minutes = Math.round((seconds - 30)/60);
      var remainingSeconds = seconds % 60;
      if (remainingSeconds &lt; 10) {
          remainingSeconds = "0" + remainingSeconds; 
      }
      document.getElementById('countdown').innerHTML = minutes + ":" +    remainingSeconds;
      if (seconds == 0) {
          clearInterval(countdownTimer);
          document.getElementById('countdown').innerHTML = "Buzz Buzz";
      } else {    
          seconds--;
      }
      }
  var countdownTimer = setInterval('secondPassed()', 1000);
  &lt;/script&gt;
  </code></pre>