title: Should we use require_once instead header location?
body: <p>i have somthing like this: (if this page needs the user to be logged)</p>
  
  <pre><code>if(!isset($_SESSION['usr_id'])){          //if not a logged user
      $_SESSION['redir']=curPageURL();//Saving the current page for the redirection
      header('Location: ../Session/loginFrm.php'); 
  }
  </code></pre>
  
  <p>and in loginFrm.php, we do:</p>
  
  <pre><code>{...after validation}    
  if(isset($_SESSION['redir'])){
          header('Location: '.$_SESSION['redir']);
      }else{...}
  </code></pre>
  
  <p>in this <a href="http://richardlynch.blogspot.com/2007/06/php-header-location-redirect-refresh.html" rel="nofollow noreferrer">page</a>, they say we should use something like this instead:</p>
  
  <pre><code> ...
      require_once '../Session/loginFrm.php';
      exit();
  </code></pre>
  
  <p>This doesn't work for me, the session variable now contains the included page, and not the current page.</p>
  
  <p>What do you think about?</p>