php/MySQL question

日本語が文字化けするのですが、どうしたら直るでしょうか?

<html>
<head><title>Kaz's program</title></head>
<body>
<?php

header('Content-Type: text/html; charset=utf-8');

include "<here I specify a file that has password info>";
$con=mysqli_connect($host,$user,$passwd,$dbname) or die ("Didn't connect, Man.");
$query="SELECT * FROM wp_posts where ID=5";
$result=mysqli_query($con,$query)
or die ("Didnt work.");
$row=mysqli_fetch_assoc($result);
printf ("%s (%s)\n",$row["ID"],$row["post_content"]);
?>

</body></html>

Leave a Reply