Welcome Guest, Not a member yet? Register   Sign In
Login and going back to previous section
#1

[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?
#2

[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.
#3

[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




Theme © iAndrew 2016 - Forum software by © MyBB