Welcome Guest, Not a member yet? Register   Sign In
database.php config not being loaded
#8

[eluser]erik.brannstrom[/eluser]
Code:
<?php

class Auth extends Model{
    
    
    function DoLogin($Email,$Password){
        
        $query = $this->db->get_where('user',array('email=>'&$Email & ',password=>'&$Password));
        
        if ($query->result){
            return true;
            }
            else
            {
            return false;
        }
        
    }
    
    
    function Register($UserDetails){
        
    }
}

First of all, the above code have a number of errors. No constructor, the array is not correct and result is a method so it should be $query->result(). The constructor was shown in a previous answer and the array should look like this: array('email' => $Email, 'password' => $Password).

Also, what changes have you done to the database file?


Messages In This Thread
database.php config not being loaded - by El Forum - 04-02-2010, 12:50 PM
database.php config not being loaded - by El Forum - 04-02-2010, 03:09 PM
database.php config not being loaded - by El Forum - 04-07-2010, 09:40 AM
database.php config not being loaded - by El Forum - 04-07-2010, 10:00 AM
database.php config not being loaded - by El Forum - 04-07-2010, 10:13 AM
database.php config not being loaded - by El Forum - 04-07-2010, 10:29 AM
database.php config not being loaded - by El Forum - 04-07-2010, 10:42 AM
database.php config not being loaded - by El Forum - 04-07-2010, 10:55 AM
database.php config not being loaded - by El Forum - 04-07-2010, 06:09 PM
database.php config not being loaded - by El Forum - 04-08-2010, 01:16 AM
database.php config not being loaded - by El Forum - 07-15-2010, 10:16 AM
database.php config not being loaded - by El Forum - 07-15-2010, 11:59 AM
database.php config not being loaded - by El Forum - 07-15-2010, 12:09 PM



Theme © iAndrew 2016 - Forum software by © MyBB