Login and going back to previous section |
[eluser]bleu[/eluser]
I have my login section in my header. I want my user to login and go back to the page from which he logged in. How can I achieve that?
[eluser]PhilTem[/eluser]
It's pretty simply! Add a hidden field to your login form which stores the URL of the current page. After validating the user's credentials, check for this post-field and simply redirect him.
[eluser]porquero[/eluser]
I recommend use Flashdata in protected sections to storing uri, so when the user is logged correctly you can redirect recovery flash data. See more: http://ellislab.com/codeigniter/user-gui...sions.html |
Welcome Guest, Not a member yet? Register Sign In |