When adding a link to a form say for instance a login form you can use drupalgetdestination() to return the user to the page they were on when they finish loging in. This show you how to do this programatically in a link l(); function.
- global $base_url;
- l("Member Login", $base_url."/user/login?".drupal_get_destination()),);
You need to login to post a comment.