CodeIgniter Forums
how to make login like codeigniter, hello guest, hello username - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: how to make login like codeigniter, hello guest, hello username (/showthread.php?tid=48073)



how to make login like codeigniter, hello guest, hello username - El Forum - 01-03-2012

[eluser]noviceCODER[/eluser]
it seems to be a big problem for me doing this all night,

first im not able to get the first_name from my database

in my members_model:

Code:
function validate()
{
  $this->db->select('first_name');
  $this->db->where('email', $this->input->post('email'));
  $this->db->where('password', md5($this->input->post('password')));
  $query = $this->db->get('registration');

  if($query->num_rows == 1)
  {
   return TRUE;
  }
}

i can't find a way to make this right

please guide me tnx
Thanks for reply