相关疑难解决方法(0)

为什么password_verify返回false?

我用a password_verify检查我的哈希密码.我有PHP 5.5:

   $this->db_connection = new mysqli(DB_HOST, DB_USER, DB_PASS, DB_NAME);


        // if no connection errors (= working database connection)
        if (!$this->db_connection->connect_errno) {

            // escape the POST stuff
            $user_name = $this->db_connection->real_escape_string($_POST['user_name']);

            // database query, getting all the info of the selected user (allows login via email address in the
            // username field)
            $sql = "SELECT user_name, user_email, user_password_hash
                    FROM users
                    WHERE user_name = '" . $user_name . "' OR user_email = '" . $user_name . "';";
            $result_of_login_check = $this->db_connection->query($sql);

            // …
Run Code Online (Sandbox Code Playgroud)

php mysql passwords post

5
推荐指数
2
解决办法
1万
查看次数

标签 统计

mysql ×1

passwords ×1

php ×1

post ×1