可捕获的致命错误:
类mysqli_result的对象无法在行中转换为字符串:99
如何解决此错误?
if($login_data)
{
$user_id = $login_data->id;
$login_data=$this->session->set_userdata(array('user_id'=>$user_id));
// print_r($login_data);
return redirect("user/dashboard/");
}
答案 0 :(得分:0)
您的$ phone变量覆盖了原始变量。试试这个:
更改
$phone = mysqli_query($this->connection,"SELECT Phone from Users WHERE Phone = '$phone'");
到
$phone_exist = mysqli_query($this->connection,"SELECT Phone from Users WHERE Phone = '$phone'");