title: Auto Update of DIV is not working
body: <p>I use this script to reload a DIV whose ID is news,</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      var auto_refresh = setInterval(function() {
          &lt;? if ($lim &gt;= 5) 
              $lim = 0;
          else 
              $lim = $lim + 2;
  
          if ($cnt == 1){
              $lim = 0; 
              $cnt += 1;
          } ?&gt;
  
          $('#news').load('update.php?lim=&lt;? echo $lim ?&gt;');
      }, 10000); // refresh every 10000 milliseconds
  &lt;/script&gt;
  </code></pre>
  
  <p>The update.php containts this code to receive the value for lim,</p>
  
  <pre><code>$lim=$_GET['lim'];
  </code></pre>
  
  <p>But after every 10 seconds the 'lim' value is sent as 0. I need to update the 'lim' value based on the condition in the script.</p>
  
  <p>I checked in update.php for $lim value using echo command. Always it is 0. What is the bug in my code?</p>