PHP redirecting to original URL after successful login
<p>I'm not sure which is the best way to do this, so I would love to hear some ideas.</p>

<p>Ok, let's say we have this link/url => <code>www.myscript.com/clients.php?id=5</code></p>

<p>If I try to open it, I get redirected to <code>www.myscript.com/login.php</code>, because I'm not logged in, and then when I get logged in I don't get redirected to original link/url <code>www.myscript.com/clients.php?id=5</code> as I would like to.</p>

<p>So what should I add to login.php to achieve such acting/working?</p>

<p>Keep in mind that URL migt be different such as:</p>

<pre><code>- www.myscript.com/clients.php?id=5
- www.myscript.com/orders.php?invoice=125
</code></pre>

<p>etc...</p>
