[eluser]harshitha[/eluser]
I create user login,it work for when one user in the data base(one row),but when I add new users it is not working,what is the reson please help me.
Contrall class>>>>>>>>>>>
function validate_credentials(){
$this->load->model('membership_model');
$query= $this->membership_model->validate();
if($query){
$data=array(
'user_name' => $this->input->post('user_name'),
'is_logged_in'=>true
);
$this->session->set_userdata($data);
redirect('login/members_area');
}else
{
$this->signup();
}
}
MOdel class>>>>>>>>>>>>
function validate(){
$this->db->where('user_name',$this->input->post('user_name'));
$this->db->where('user_password',$this->input->post('user_password'));
$query=$this->db->get('users');
if ( $query->num_rows == 1){
return true;
}
else{
echo 'khhhhhhhjkj';
}
}
this code work properly one user in the data base......
Thank you,
Hasitha Bandara Athauda............