I am getting "Notice: Undefined property: stdClass::$id i in mentioned bold italic line when i call below function : public function userlogin()
	{
		$sql = 'select id, username from login_user where email="'.$this->email.'"and password="'.$this->password.'"';
		$result = mysqli_query($this->cn,$sql);
		$numrows = mysqli_num_rows($result);
		if($numrows == 1)
		{
			$data = mysqli_fetch_field($result);
			***$uid = $data->id;
			$uname = $data->username;***
			
			$_SESSION['login'] = 1;
			$_SESSION['uid'] = $uid;
			$_SESSION['uname'] = $uname;
			$_SESSION['login_msg'] = 'Login Successfully...';
	
		}
		
	}