Good day!

There was a problem transferring the php site from Denver to a remote server. Data in Russian, which were entered into the database in advance, are displayed correctly. But when I try to enter new data through the form, then question marks get into the database and they are also displayed on the screen.

In the database, the type of tables MyISAM, comparison utf8_general_ci.

SET NAMES utf8 and SET CHARACTER SET utf8 are installed in the base connection script.

Header ('Content-Type: text / html; charset = utf-8') is registered on all pages of the site.

What else needs to be done?

  • At the table fields, naturally, also utf? - ilyaplot
  • yes, at the fields too - humster_spb
  • And you can Create Statement for the table. Well, the form / page code? - E_p
  • There is no statement as such - everything was done via phpmyadmin, manually. The form is the most banal, with input. Attributes - method = "POST" action = "usinfo.php" enctype = "multipart / form-data" (here the code is simply not copied correctly) - humster_spb
  • In the table itself, the new data is correct or also with question marks? - cheops

2 answers 2

Is the php file sending the data saved in the wrong encoding? (need UTF-8)

  • No, everything is saved in UTF-8, that's not the point (( - humster_spb

The problem is solved, thank you all. It turned out that SET COLLATION_CONNECTION = "utf8_general_ci" must also be specified in the database connection script.