title: Determine if $_SESSION superglobal exists in PHP
body: <p>I want to do something like this:</p>
  
  <pre><code>if ($_SESSION['errors'] exists)
  {
      //Do stuff
  }
  </code></pre>
  
  <p>I want to create a session on page1 and then go to page2 where it will check for errors, if there are errors it returns to page1 with the errors.</p>
  
  <p>But page1 will give errors if the variable hasn't been created yet on page 2.</p>
  
  <p>If I do <code>$_SESSION['errors'] == ""</code> on page1 it will reset the variable so that's no good.  </p>