title: How do I use a PHP session to prevent duplicate form submissions?
body: <p>I want to stop duplicate form submissions to my webpage. Everywhere I look for help, I see use a <code>$_SESSION</code> variable; but I fail to see how sessions and forms could possibly connect to each other outside the context of multiple user accounts. </p>
  
  <p>Can someone show me exactly how this process works?</p>
  
  <p>Edit: I don't want to stop the form being submitted multiple times; only to prevent resubmitting the form with the same values (on page refresh for example).</p>
  
  <p>After the form is processed, the user should see a success/error message and then the form again.</p>