title: Redirecting back after login in PHP
body: <p>I have a scenario like this. When the admin receive a mail from client about orders with a URL link to PHP form page, which only can accessed by admin login. If administrator is not logged in, the url will be redirected to the login page. After the administrator logged in successfully I need to redirect him to the URL that he received in the email. </p>
  
  <p>Can anybody tell me how to do it. I read something about HTTP_REFERER, but its not working properly as if the admin is not logged in, it directly redirect to login.php</p>
  
  <p>Please help me to solve the problem</p>
  
  <p>Thanks</p>