title: how to go to the same page after login in PHP
body: <p>For example, </p>
  
  <p><strong>STEP 1:</strong></p>
  
  <p>I am browsing a page without logging in and my last page before logging in is beforeLogin.php</p>
  
  <p><strong>STEP 2:</strong></p>
  
  <p>Now my prob is when i logged in i am redirecting to the index.php page. Instead i should be redirected to the last page what i had browsed. </p>
  
  <p>That is from the above example is should redirected to beforeLogin.php</p>
  
  <p>How should this can be done.</p>
  
  <p>Any help will be appreciable.</p>
  
  <p>thanks in advance</p>