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