title: Session variables from form not showing on next page
body: <p>I can set session variables and use them on another page. However when i try to use a simple contactform with a username and email address and try to store them into session variables, they don't show up on other pages. There must be something basic i'm missing. </p>
  
  <p>Here's the form:</p>
  
  <pre><code>&lt;?php
  session_start();
  $submit = $_POST["submit"];
  if($submit){setSessionVars();}
  function setSessionVars() {
      $_SESSION['name'] = $_POST['name'];
      $_SESSION['email'] = $_POST['email'];
      header('Location: session.php');
  }
  ?&gt;
  
  &lt;html&gt;
  &lt;body&gt;
    &lt;form action="session.php" method"post"&gt;
      &lt;input name="name" type="text" value="Name" size="11" /&gt;&lt;br /&gt;
      &lt;input name="email" type="text" value="Email" size="11" /&gt;&lt;br /&gt;&lt;br /&gt;
      &lt;input name="submit" type="submit" value="Submit" size="11" /&gt;
    &lt;/form&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>And this is session.php:</p>
  
  <pre><code>&lt;?php
  session_start();
  echo $_SESSION['name'];
  echo $_POST['name'];
  ?&gt;
  </code></pre>
  
  <p>Also</p>
  
  <pre><code>header('Location: session.php');
  </code></pre>
  
  <p>is not working. Any ideas?</p>