Here is how I read the data:
<?php
$id = $_GET["id"];
$number = mysql_real_escape_string($id);
$result = mysql_query('SELECT * FROM `mystory` where `id` = ' . "$number" . ' LIMIT 1');
$row = mysql_fetch_assoc($result);
echo $row['story'];
?>
The data is encoded as utf8_bin. Insted of ı PHP outputs ?
Why is that?
You need to make sure that your connection to the database us in UTF-8 as well. You can do that this way:
mysql_query("SET NAMES utf8");
Also make sure that you are telling the browser that it is UTF-8:
header("Content-type: text/html; charset=utf-8");
This is the only code worked for me :-
mysqli_set_charset($con,'utf8');
Where $con is your connection value to DB . Be sure put the code after connect and error code and you will be fine .
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With