title: Storing form data as a temporary session
body: <p>I have looked at <a href="https://stackoverflow.com/questions/3791414/storing-form-data-as-a-session-variable">Storing Form Data as a Session Variable</a>, but nobody said how to undo the session once the user leaves that form. For me, once the session is set it is constantly set (until logged out I presume). So <strong>Username</strong> field for example will always have "test" in it if I unsuccessfully OR successfully submit the form with "test" in it and then just go to some other links. Here's what I've got:</p>
  
  <pre><code>$_SESSION['temp_username'] = $_POST['username'];
  </code></pre>