1. First, find the table you created in phpMyAdmin, such as table1 (note that the table is not a database), click "Structure" above, and find the column in which you want to save Chinese Name, such as information, click "Modify" on the right and change the sorting rule to utf8_general_ci.
PS: If you build this table first, and then modify the sorting rules of the table or the sorting rules of the external database or even the server rules according to the tutorials mentioned on the Internet, you still cannot insert Chinese characters. , it must be accurate to this field, and if you set the character set when creating the table, there is no problem.
2. Add
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
to the head part of the html part of the page that is displayed after you run it, as shown below:
mysql_query("set names 'utf8'");
The above is the detailed content of phpmyadmin Chinese garbled code. For more information, please follow other related articles on the PHP Chinese website!