Look at this code:
$this->session->set_flashdata('prev_page', $this->uri->uri_string());
echo $this->uri->uri_string();
echo $this->session->flashdata('prev_page');
When visiting mywebsite/index.php/home/
echo $this->uri->uri_string();
prints home
echo $this->session->flashdata('prev_page');
prints home/picktype
, a completely different function in the same controller!
The controller functions in question:
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');
}
}
Why could this be happening?