title: PHP class sessions
body: <p>I'm sorry, I followed WikiHow steps (link is down there) and I made everything but here is the problem:</p>
  
  <p>My index.php contains password input.</p>
  
  <pre><code>    if(isset($_POST['login']))
              {
                  require('session.class.php');
                  if(hash('sha256', $_POST['pass']) == hash('sha256', 'password123'))
                  {
                          $session = new session();
                          $session-&gt;start_session('_s', false);
                          $_SESSION['namesession'] = 'something';
                          header(location: /mama.php);
  
                  }
                  else
                  {
                          echo "&lt;font color='#FF0000'&gt;Wrong password!&lt;/font&gt;";
                  }
      }   
  </code></pre>
  
  <p>I don't understand how to put session check on other pages. Other words:
  How to put inside if password is correct, you can stay on mama.php page..</p>
  
  <p><a href="http://www.wikihow.com/Create-a-Secure-Session-Management-System-in-PHP-and-MySQL#Create_session.class.php_file_sub" rel="nofollow">http://www.wikihow.com/Create-a-Secure-Session-Management-System-in-PHP-and-MySQL#Create_session.class.php_file_sub</a></p>