Strict Standards: Only variables should be passed by reference in m_auth

前端 未结 4 1179
栀梦
栀梦 2020-12-22 14:16

I am working on a login system for a project using MVC programming and ran into this error. Here is the code, the problem line is #31

This login system is a tutoria

4条回答
  •  旧巷少年郎
    2020-12-22 15:11

    bind_param's params are references to variables. You can't use md5() there. You need to save it to a variable first.

    $userPass = md5($pass . $this->salt);
    $stmt->bind_param("ss", $user, $userPass);
    

提交回复
热议问题