[eluser]Unknown[/eluser]
Look at this code:
Code:
$this->session->set_flashdata('prev_page', $this->uri->uri_string());
echo $this->uri->uri_string();
echo $this->session->flashdata('prev_page');
I have it running at each controller call.
When visiting mywebsite/index.php/home/
Code:
echo $this->uri->uri_string();
prints home
Code:
echo $this->session->flashdata('prev_page');
prints home/picktype, a completely different function in the same controller!
The controller functions in question:
Code:
class Home extends MY_Controller {
function __construct()
{
parent::__construct();
}
public function index()
{
if($this->input->cookie('disclaimer_seen_token'))
{
$this->load->view('home');
} else {
redirect('disclaimer');
}
}
public function picktype()
{
$this->load->view('picktype');
}
}
The strange thing is, this is only an issue on the index, all other functions work fine.
Why could this be happening?