title: Change SESSION variable value
body: <p>I've been attempting to figure this out for a little while now, and it's driving me nuts.  Basically I have a form for US and Canadian users.  There's a link at the bottom of the form for Canadian users, which directs users to can-sesssion.php, which contains:</p>
  
  <pre><code>&lt;?php
  if (isset($_SESSION['can'])) {
      session_start();
      session_destroy();
      session_unset();
      session_start();
      $_SESSION['can'] = 2;
  }
  else {
      session_start();
      $_SESSION['can'] = 1;
  }
  header('Location: '. $_SERVER['HTTP_REFERER'] . '');
  ?&gt;
  </code></pre>
  
  <p>Basically, if they click on the link, it sets $_SESSION['can'] = 1.  Now There's another option, and if they click that link, it takes them back to this page, and the session should be destroyed and a new value is set (well, that's what it's supposed to do).  Problem is, I've printed out $_SESSION['can'], and it's still retaining that old value after going to that page.  Is there a better way to do this, or is there something wrong w/ my code?  Thanks for the help.</p>