I want to send my session data from one controller to another.
<?php
abc.php // controller name
class abc extends MY_Controller
{
public function set_new_data()
{
$_SESSION['sample'] = 'testing';
}
}
?>
<?php
xyz.php // another controller name
class xyzextends MY_Controller
{
public function get_data()
{
echo $_SESSION['sample'];
}
}
?>
I am using HMVC pattern in codeigniter. I want to call abc/set_new_data to set session then redirect to xyz/get_data to get data but I am unable to pass data.