CodeIgniter Forums

Full Version: session help
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[eluser]dadamssg[/eluser]
how do i get this to redirect right? its a login. Im setting the session page variable for each page the user views and then when they login i want them to redirect to their current page. I know my session variable is holding a value i just cant seem to use it in the redirect

Code:
$page = $this->session->userdata('page');
redirect("mains/$page");

El Forum

[eluser]jedd[/eluser]
Rather than ...
[quote author="dadamssg" date="1263093869"]
Code:
$page = $this->session->userdata('page');
redirect("mains/$page");
[/quote]

... try
Code:
$page = $this->session->userdata('page');
redirect("mains/". $page);