Welcome Guest, Not a member yet? Register   Sign In
On change, go back to 'last' page
#1

[eluser]smilie[/eluser]
Hi all,

I need following:

User can change between languages.
But - how can I return user to the page he was on, after language has been changed?

Only thing I could think of is to put current_url() in a flashdata.

Are there any other solutions?

Cheers,
Smilie
#2

[eluser]smilie[/eluser]
Found it.
I did use the current_url() and after in controller the session value has been changed I simply did redirect($this->session->flashdata($var));

Sometimes it is as easy as it looks like :-)

Cheers,
Smilie
#3

[eluser]Christophe28[/eluser]
And it can be simpler :-)

I use a http referrer for this: header("Location:".$_SERVER['HTTP_REFERER']);

This php function redirect the user back to the page he comes from.

Christophe




Theme © iAndrew 2016 - Forum software by © MyBB