Severity: Notice
Message: Undefined index: password
Filename: models/userr.php
Line Number: 10
Backtrace:
File: C:\xampp\htdocs\cooladmin\application\models\userr.php Line: 10 Function: _error_handler
File: C:\xampp\htdocs\cooladmin\application\controllers\auth.php Line: 17 Function: login
File: C:\xampp\htdocs\cooladmin\index.php Line: 315 Function: require_once
class userr extends CI_Model {
public function login($post)
{
$this->db->select('*');
$this->db->from('user');
$this->db->where('username', $post['username']);
$this->db->where('password', $post['password']);
$query = $this->db->get();
return $query;
}
class auth extends CI_Controller {
public function login()
{
$this->load->view('login');
}
public function process()
{
$post = $this->input->post(null, TRUE);
if(isset($post['login'])) {
$this->load->model('userr');
$query = $this->userr->login($post);
if($query->num_rows() > 0) {
echo "login berhasil !";
} else {
echo "login gagal !";
}
}
}
}