Change getDetails() method by this
// $this->session->userdata['id'] to this code $this->session->userdata('id')
public function getDetails()
{
$st = $this->db->SELECT('cursadas.date as date, cursadas.grade as grade,
usuarios.username as user, materias.name as subject')->from('cursadas')
->join('usuarios','usuarios.id=cursadas.user_id')
->join('materias','materias.id=cursadas.subject_id')
->WHERE('cursadas.user_id=',$this->session->userdata('id'))
->get()->result_array();
return $st;
}
see the link for more info
https://www.codeigniter.com/user_guide/libraries/sessions.html#retrieving-session-data
3
solved Error after loggin out