title: Submit a form only once; don't submit when page is refreshed
body: <p>This question is so basic that I'm almost embarrassed to ask it, but it's got me stumped. I've written a short code snippet to explain it:</p>
  
  <pre><code>&lt;form id="MyForm" method="post" enctype="multipart/form-data" &gt;
      &lt;input type="file" id="get_file" name="get_file" &gt;
      &lt;input type="submit" name="submitForm" value="Submit" &gt;
  &lt;/form&gt;
  
  &lt;?php
      if (isset($_POST['submitForm'])) {
      echo "&lt;script type='text/javascript'&gt;alert('Selected')&lt;/script&gt;";
  } else {    
      echo "&lt;script type='text/javascript'&gt;alert('Not selected')&lt;/script&gt;";
  }
  ?&gt;
  </code></pre>
  
  <p>When I load this page the first time, the alert says "Not selected". Good. I submit the form and the alert says "Selected". Also good. But when I refresh the page, it's still "Selected". I don't understand why the "IF" statement allows this to happen. I want my form to submit data once and not do it again until my user does it, not every time the page refreshes.</p>
  
  <p>This seems like the kind of question that noobs ask when they're too lazy to use Google, but I've looked (there are even some threads on this site that sort of address this issue, but nobody has presented a solution). I've read up on HTML forms, but I still don't get it. </p>
  
  <p>Is this something everyone knows but me? Can somebody clue me in? Thanks. </p>
  
  <p>EDIT: If anybody ever stumbles over this thread and needs a quick-and-dirty fix, here's one I just stumbled on. Just press the select key again, easily done using jQuery. The form is resubmitted, but the form variables are all cleared. Not elegant, maybe, but it works perfectly.</p>