Return to Snippet

Revision: 37190
at December 5, 2010 18:49 by Onfire60


Initial Code
global $base_url;
l("Member Login", $base_url."/user/login?".drupal_get_destination()),);

Initial URL


Initial Description
When adding a link to a form say for instance a login form you can use drupal_get_destination() 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.

Initial Title
Using drupal_get_destination() in a link item "l()"

Initial Tags
links, drupal

Initial Language
PHP