Php 消息:未定义索引:密码
严重性:通知 消息:未定义索引:密码 文件名:models/userr.php 电话号码:10 回溯: 文件:C:\xampp\htdocs\cooladmin\application\models\userr.php行:10 函数:\u错误\u处理程序 文件:C:\xampp\htdocs\cooladmin\application\controllers\auth.php行: 17功能:登录 文件:C:\xampp\htdocs\cooladmin\index.php行:315函数: 需要一次 类userr扩展了CI_模型{Php 消息:未定义索引:密码,php,adminlte,Php,Adminlte,严重性:通知 消息:未定义索引:密码 文件名:models/userr.php 电话号码:10 回溯: 文件:C:\xampp\htdocs\cooladmin\application\models\userr.php行:10 函数:\u错误\u处理程序 文件:C:\xampp\htdocs\cooladmin\application\controllers\auth.php行: 17功能:登录 文件:C:\xampp\htdocs\cooladmin\index.php行:315函数: 需要一
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;
}
类auth扩展CI_控制器
{
}使用以下方法:
$this->db->where('password', isset($post['password']) ? $post['password'] : '');
这只是意味着密码没有从表单中发布可能的重复项
$this->db->where('password', isset($post['password']) ? $post['password'] : '');