[eluser]Dam1an[/eluser]
[quote author="eoinmcg" date="1241798485"]Another method is to have a hidden field containing $_SERVER['HTTP_REFERER'] in your login form.
On successful login you can redirect to whatever value it contained[/quote]
I've had bad experiences with that, can't remember what I was trying to do, but it either wasn;t always set, or wasn;t always accurate :-S