• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
user login not work

#1
[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............


Messages In This Thread
user login not work - by El Forum - 05-23-2011, 01:08 AM
user login not work - by El Forum - 05-23-2011, 03:14 AM
user login not work - by El Forum - 05-23-2011, 04:27 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.