title: How to get session variables from php server with Ajax function? (PHP HTML JS Ajax)
body: <p>so in my php I have something like this</p>
  
  <pre><code>$_SESSION['opened'] = true;
  </code></pre>
  
  <p>But It will not be set to true until user will perform some actions with some other html\php pages</p>
  
  <p>So I need on some Ajax function to be able get this session variable. And some PHP sample of function to get variable in form ready for Ajax to get it.</p>
  
  <p>so I need something to AJAX requesting to an action (to some simple php code) which will return a value from <code>$_SESSION</code>.</p>
  
  <p>How to do such thing?</p>