title: php password script and javascript refresh conflicting, gives off form resubmit message that i would like to eliminate
body: <p>I have a bug but everything works great otherwise.</p>
  
  <p>The dialog 'Confirm Form Resubmission' pops up every time the refresh happens. I use a javascript refresh which works without bugs in Chrome, but when I manual refresh I get that dialog. With firefox I need to resend no matter what. The refresh is unavoidable as it is my way to poll a text file that's updated by another computer every  minute.</p>
  
  <p>What can I do, to get rid of that dialog?</p>
  
  <p>Here is my php variable</p>
  
  <pre><code>&lt;?php
    $password = 'aaf4c61ddcc5e8a2dabede0f3b482cd9aea9434d';
    session_start();
      if (!isset($_SESSION['loggedIn'])) {
    $_SESSION['loggedIn'] = false;
  }
  
    if (isset($_POST['password'])) {
    if (sha1($_POST['password']) == $password) {
      $_SESSION['loggedIn'] = true;
  } else {
      die ('Incorrect password');
    }
  } 
    if (!$_SESSION['loggedIn']): 
  ?&gt;
  
  &lt;html&gt;&lt;head&gt;&lt;title&gt;Login&lt;/title&gt;
  &lt;style&gt;
    #formenclosure  {
      width: 300px;
      height:300px;
      margin-top:50px;
      margin-left:auto;
      margin-right:auto;
      color:fff;
         }
  &lt;/style&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;div id="formenclosure"&gt;
  &lt;fieldset&gt;
  &lt;legend&gt;You need to login&lt;/legend&gt;
  &lt;form method="post"&gt;
    Password: &lt;input type="password" name="password"&gt; &lt;br /&gt;
    &lt;input type="submit" name="submit" value="Login"&gt;
  &lt;/form&gt;
  &lt;/fieldset&gt;
  &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  
  &lt;?php
  exit();
  endif;
  ?&gt;
  </code></pre>
  
  <p>here is my refresh code and the require that goes on top of all the documents that you need protected.</p>
  
  <pre><code>&lt;?php
     require('access.php');
  ?&gt;
  
  &lt;script&gt;
     function refresh() {
       setInterval(function () {
       location.reload(true)
       }, 60000);           // reload page every 60 seconds
  
    }
   &lt;/script&gt;
  </code></pre>