title: Loading JS LocalStorage into PHP Variable
body: <p>In the header of my doc I am defining an email and password. I would like to use local storage. However I am having trouble loading items from localstorage into my php vars.</p>
  <p>Here is my code.</p>
  <pre><code>&lt;script&gt;
      localStorage.setItem('email', '&lt;?php echo $_SESSION['email'];?&gt;');  
      localStorage.setItem('password', '&lt;?php echo $_SESSION['password'];?&gt;');
  &lt;/script&gt;
  
  &lt;?php
      $user_email = &quot;&lt;script&gt;document.write(localStorage.getItem('email'));&lt;/script&gt;&quot;;
      $password = &quot;&lt;script&gt;document.write(localStorage.getItem('password'));&lt;/script&gt;&quot;;
  
      define('XOAUTH_USERNAME', $user_email);
      define('XOAUTH_PASSWORD', $password);
  ?&gt;
  
  &lt;html&gt;
      &lt;head&gt;&lt;/head&gt;
      &lt;body&gt;&lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  <p>I know that I am setting the localstorage right because I'm checking in chrome and both key and value are correct. I'm just having problems passing the value of the keys into the define() of my php.</p>
  <p>Thanks for the help!</p>