Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
Try
pasting after
mysql_query('SET NAMES utf8');
mysql_query('SET CHARACTER SET utf8');
mysql_query('SET COLLATION_CONNECTION="utf8_general_ci"');
<?php
$db = mysql_connect("localhost","arman","kiker555");
mysql_select_db("firstbd",$db);
mysql_query("SET character_set_results = 'utf8', character_set_client = 'utf8', character_set_connection = 'utf8', character_set_database = 'utf8', character_set_server = 'utf8'", $db);
$result = mysql_query("SELECT * FROM firma",$db);
$myrow = mysql_fetch_array($result);
echo $myrow["name"];
?>
1. forget you already about mysql_connect. only mysqli
2. what is the encoding in html? Please provide the page code in full.
Question marks are also an encoding problem, not always scribbles. Depends on what is the source and what is the final encoding. The final is most likely UTF, which means the original, most likely, cp-1251.
Maybe this?
echo iconv("windows-1251", "UTF-8", $db); //if it doesn't work, then here
//echo iconv("UTF-8", "windows-1251", $db);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question