If the encoding of the site and the database does not match (some of the text on the site is displayed normally, and some of the text from the database is in the form of incomprehensible characters), you need to add commands in the script that connects to the database that will indicate the encoding to the MySQL server where you want to display the text. Depending on which PHP library you are using, the commands will look like this:
utf8you must specify the desired encoding (for example,
utf8_general_ci- the desired encoding mapping (for example,
cp1251_general_ci). A complete list of MySQL encodings and collations is available at official documentation.
$link(you can find it out by looking in the source code for the name of the variable to which the result of the function is assigned