title: How to Refresh a .php Page After Form Submitted?
body: <p>This seems to be pretty basic but I've looked at all the suggestions (online) I can find -- and they did not work -- so I thought I might as well ask the Stack-Community.</p>
  
  <p>I simply want my page to refresh AFTER the form is submitted.</p>
  
  <p>I have my php Session Header first on the .php page:</p>
  
  <pre><code>if(isset($_GET['logout'])) {
  $_SESSION['username'] = '';
  header('Location:  ' . $_SERVER['PHP_SELF']);
   }
  
  if(isset($_POST['username'])) {
      if($userinfo[$_POST['username']] == $_POST['password']) {
      $_SESSION['username'] = $_POST['username'];
  }else {
      echo "Wrong username or password.";
  }
  }
  </code></pre>
  
  <p>I then have a form start code:</p>
  
  <pre><code>     &lt;form action="" method="post" &gt;
  </code></pre>
  
  <p>I have used different inside the action " " but these don't seem to work.</p>
  
  <p>I also then have a input type " " that looks like this:</p>
  
  <pre><code>     &lt;input type="submit" name="submit_invoice" value="Submit" /&gt;
  </code></pre>
  
  <p>However, nothing I alter in this makes the page load AFTER the form is submitted.</p>
  
  <p>Here are some of the things I've tried on either the FORM or the INPUT TYPE areas OR after the query to update the mysql record in the DB.  Please Note: I am able to update the data in the DB so the code is working . . . but nothing seems to work.  I must be doing a little thing wrong.</p>
  
  <pre><code>     header('Location:  ' . $_SERVER['PHP_SELF']);
       location.reload();
  </code></pre>
  
  <p>When I use header() the error is that the header is already set up so can't do it again.  Location reload simply does not reload.  </p>
  
  <p>Any help, much appreciated.  </p>