1

它没有显示任何东西

         $db =  new  mysqli(MYSQL_SERVER,MYSQL_USER,MYSQL_PASSWORD,DATABASE_NAME);

    $query = 'SELECT * FROM `user` WHERE `username` = ? AND `password` = ?';

    if($stmt = $db->prepare($query))
    {
        $stmt->bind_param('ss', $username, $password);
        $stmt->execute();
        $returned_name = '';
        $returned_pass = '';
        $stmt->bind_result($returned_name,$returned_pass);
        while($stmt->fetch()){
            echo $returned_name;
        }
        $stmt->close();
    }
}
4

0 回答 0