Welcome Guest, Not a member yet? Register   Sign In
How to show data only his data while he login
#1

Hi everyone, 
The condition is employee login by using email as username, and after login all employess data are shown in the table. But the condition  i want is this: when an employee login, he only could see his data only.

The condition now is :

    $this->datatables->select('id_users,full_name,email,address,images,salary');
   $this->datatables->from('tbl_user');

It will show up all data,,so i modified it by adding this line


    $this->datatables->select('id_users,full_name,email,address,images,salary');
   $this->datatables->from('tbl_user');
   $this->datatables->where('email=".$this->session->email."');
But no data shown up in the table, how to fix this? 

I am sorry , i already google but still confuse, i think this is about getting record by session, any help will be very usefull since  i am a beginner, thanks.
Reply


Messages In This Thread
How to show data only his data while he login - by kelapamuda - 02-16-2018, 11:18 AM



Theme © iAndrew 2016 - Forum software by © MyBB