title: Is it possible to update the php file while it is viewed?
body: <p>Let's say I have a PHP file that contains a <code>POST</code> or <code>GET</code> variable:</p>
  
  <pre><code>if(isset($_POST['data'])){
      $data = $_POST['data'];
      echo $data;
  }
  </code></pre>
  
  <p>Is it possible to update that value, While the user is viewing that page?</p>
  
  <p>So that when I (The admin) click a button on another page, A value is changed in the DB and that variable or an html element is changed?</p>
  
  <p>So for example (Didn't work):</p>
  
  <pre><code>$.post('file.php', {data: data}, function(){});
  </code></pre>
  
  <p>Then while the user is viewing that <code>file.php</code>, The <code>$data</code> is updated with the new posted data.</p>