title: how to pass session value other page if condition true in php
body: <p>i have a  <code>$_sesstion['usermail']</code>. i want to pass this value to next page.if condition match <code>($answer= $_SESSTION['usermail']);</code></p>
  
  <pre><code>if(isset($_POST['compair']))
  {
  
      echo $_SESSION['question'];
       $_SESSION['usermail'];
      $answer=$_POST['answer'];
      if ($answer ==  $_SESSION['answer'])
      {
           header("Location:resetpass.php");
  
      }
      else
      {
           echo "&lt;script&gt;alert('Please Try again')&lt;/script&gt;";
  
      } 
  
  }
  </code></pre>
  
  <p>i want to pass <code>$_sesstion['usermail']</code> value on <code>resetpass.php</code> page.</p>