Hello,
I have a problem with charset UTF8. When I set this charset for my page - I can use only english letters and can’t use cyrillic letters. But in datas from MySQL cyrillic letters display normal on web page. When I change charset to windows-1251 - cyrillic letters display normal on web site but cyrillic letters in data from MySQL don’t display normal.
In data from MySQL charset = UTF8, I can’t use Windows-1251 there.
Here a code, that displays data from MySQL on web page:
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Шутки</title>
</head>
<body>
<p><a href="?addjoke">Press this link and you can add joke</a></p>
<p> <?php
$jok = "Jokes from database: ";
echo $jok; ?>
</p>
<p> <?php
foreach ($jokes as $joke): ?>
<form action="?deletejoke" method="post">
<blockquote>
<p><?php htmlout($joke['text']); ?>
<input type="hidden" name="id" value="<?php echo $joke['id']; ?>"><input type="submit" value="Delete"> (author: <a href="mailto:<?php htmlout($joke['email']);?>"><?php
htmlout ($joke['name']); ?> </a> )
</p>
</blockquote> </form>
<?php endforeach; ?>
</p>
</body>
</html>
I will be very thankful for any help.