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

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(){

$query= $this->membership_model->validate();

'user_name' => $this->input->post('user_name'),





MOdel class>>>>>>>>>>>>

function validate(){



if ( $query->num_rows == 1){

return true;



echo 'khhhhhhhjkj';

this code work properly one user in the data base......

Thank you,

Hasitha Bandara Athauda............

Your code seems ok. Are you using global xss. Could it be that the password cause the error? Maybe try with

This is not very secure since it leaves the field unprotected.
You should btw use something like
or any other encryption, so as not to store the real password in the db and also sanitize through enryption the data.

PS. please use the code tag to place code. [ code] [ /code] without the trailing space after [

If your database passwords are hashed then you need to also hash the user's entered password to compare it to the database password!


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

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