title: php sessions wont save form data
body: <p>Here's what I have so far. The problem is when I hit submit it takes me to the next page, but the session does not store the first name. If I remove the action, so it's action="" then the session saves the first name. Why does this happen and how do I fix it?</p>
  
  <pre><code>...html stuff...
  
  &lt;?php
  session_start();
  if(isset($_POST['submit'])){ $_SESSION['firstName'] = $_POST['firstName']; }
  ?&gt;
  
  &lt;form method="POST" action="nextPage.php"&gt;
  &lt;input name="firstName" type="text" size="70"/&gt;
  ...
  &lt;input type="submit" name="submit" value="Continue"/&gt;
  &lt;/form&gt;
  </code></pre>