Answer the question
In order to leave comments, you need to log in
Incomprehensible characters when transferring data to the database, how to fix?
I enter data into the database. Those data that come from the post request are added to the database in the form of Тульчин . And in general, even if you create a variable and insert a string there, transfer it - the result is similar. But if you write the line "test" in the request for additions, it is displayed adequately in the database. What's the matter?
Answer the question
In order to leave comments, you need to log in
$dbh = new PDO("чтототам", $user, $password);
$dbh->exec("set names utf8"); // добавить эту строку
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question