this is used to authenticate my users from accesing the views in this controller I keep getting this error when trying to access session data
---PHP Fatal error: Call to a member function userdata() on null in G:\PleskVhosts\apptcenter.com\control.apptcenter.com\application\controllers\tech.php on line 13 ----
I have tried loading the session library here and reinitializing my session(session_start()) but I keeps saying its is null or that im calling library() on null.
class tech extends CI_Controller {
function __construct()
{
$email = $this->session->userdata("activeEmail");
$query = $db->query("SELECT * FROM tech WHERE Contains('email', $email)");
if(empty($query))
{
redirect("Welcome/index");
}
}