public function add()
{
$id=(int)input('get.id');
$data['item']= $this->db->table('admins')->where(array('id'=>$id))->item();
}
$data['item']=$this->db->table('admins')->where(array('id'=>$id))->item();
Isn’t the passed id converted to 0? What is the purpose of the $data['item'] query?
Why did the id change to 0? The query should be to check whether the user information exists in the administrator database, and then determine the login.