[eluser]SaSa[/eluser]
Hi
I started a session with this load:
Code:
$this->load->library('session');
now if I want it used to take matching other pages. What is it?
my code:
Code:
function admin_login_successful(){
//isert to $
$useradmin = $this->input->post('useradmin', TRUE);
$passadmin = $this->input->post('passadmin', TRUE);
//convert to hash
$passworddx = md5($passadmin);
//array for where
$where = array('useradmin' => $useradmin, 'passadmin' => $passworddx);
//select and weher
$q = $this->db->get_where('login', $where);
$name = $q->row()->useradmin;
//insert to session user admin
$this->session->userdata('useradmin', $name);
//if suss go to indexadmin
$data['welcome'] = "welcome $name";
$this->load->view('managing-director-zig/indexadmin', $data);
}