thanks for the response have got rud of my first error when data is null but now my issue in controller how to retrieve the returned values to work with them
mycode:
function index()
{
$details = $this->user_model->get_user_by_id($this->session->userdata('uid'));
//kama row haina kitu kufanyike nini?------some code
if ($details ){
//Hii code inaload row moja yenye session iko active in both tables ie facility na users
$data['uname'] = $details[0]->name;
$data['uemail'] = $details[0]->email;
$data['ucat'] = $details[0]->category;
$data['fmail'] = $details[0]->emaile;
$data['age'] = $details[0]->age;
$this->load->view('profile_view', $data);
}
else if ($data['ucat'] =='service' && $data['fmail']!=$data['uemail'] )
{
$this->load->view('facility_view', $data);
}
else
{
$this->load->view('welcome_message.php');
}
}
thanks
Sense & Simplicity