Welcome Guest, Not a member yet? Register   Sign In
Redirects
#1

[eluser]Stewart Matheson[/eluser]
Hello fellow Igniters,

Lets say a user is on page x. They then click on a link to go to another page with a form on it that saves to the database. The user then fills out the form and on success the user is taken back to page x. What is the best way to redirect the user back to page x. The problem is that this link appears on a number of different pages so page x will change depending on how the user got to the form page. Also I cant use javascript as these pages are running on mobile devices. Any suggestions on this would be great.

Thanks in advance
Stewart Smile
#2

[eluser]Michael Wales[/eluser]
I like to use session variables, setting the controller/method to that variable for every page that can be "returned to" when it is visited.

For example, I'm on the home page (so my session variable is blank). I click on Login, which presents me with a login form (this form can't be "returned to" after logging in, so the session var doesn't change). They login, we read the var and send them to whatever it there (in this case, nothing, therefore they go to home).
#3

[eluser]esra[/eluser]
I noticed this contribution the other day but have not had time to experiment with it.

http://ellislab.com/forums/viewthread/58091/




Theme © iAndrew 2016 - Forum software by © MyBB