title: pass php variables javascript window location
body: <p>I am trying to destroy all form sessions as follows:
  i have a sidenav.php bar, when the user clicks on it, it goes to this page:</p>
  
  <pre><code>&lt;?php
  session_start();
  unset($_SESSION['applicationID']);
  session_destroy();
  echo'&lt;html&gt;&lt;script&gt;window.location="index.php?url=newapplication&amp;id="'.$userid.';&lt;/script&gt;&lt;/html&gt;';
  ?&gt;
  </code></pre>
  
  <p>which in turn bring up the new application form, however, the <code>"$userid"</code> fails to echo. it comes back as blank. any ideas?</p>