tengo mi controlador verifylogin.php:
Código PHP:
<?php
if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class VerifyLogin extends CI_Controller
{
function __construct() {
parent::__construct();
$this->load->model('user','',TRUE);
}
public function index(){
$user= $this->input->post('Usuario');
$pass = $this->input->post('Password');
$data = $this->user->getPasswordUser($user);
$passw = $data['userPass'];
if($pass==$passw){
$this->load->view('main_view');
}else{
$this->load->view('login_view');
}
}
}
?>
Código PHP:
<?php
class User extends CI_Model
{
function getPasswordUser($usuario){
$this->db->select('userPass');
$this->db->from('user');
$this->db->where('usuario', $usuario);
$query = $this -> db -> get();
if($query -> num_rows() >= 1)
{
return $query->result_array();
}
else
{
return false;
}
}
}
?>
Message: Undefined index: userPass
Filename: controllers/verifylogin.php
Line Number: 16
espero me puedan hechar la mano, de antemano gracias.