title: Prevent form from being submitted twice
body: <p>I have a simple php form, like this:</p>
  
  <pre><code>&lt;?php
  
  if(isset($_POST['myform']))
     // email...
  else
     // display form
  </code></pre>
  
  <p>the problem is that if I refresh the page after I submit the form, it gets submitted twice.
  How can I prevent this from happening?</p>