Solution to the problem that Chinese cannot be inserted into the php database: 1. Add "" to PHP; 2. Open the data and add " mysql_query("set names utf-8");".
What should I do if the php database cannot insert Chinese characters?
php mysql cannot insert Chinese characters
Write PHP today to operate the MySQL database The program displays a question mark when inserting Chinese characters, as shown below:| abcdef3233 | 123456 | abcdef3233@163.com | ????????? | 2011-12-25 10:22:47 |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
mysql_query("set names utf-8");
PHP Video Tutorial"
The above is the detailed content of What should I do if the PHP database cannot insert Chinese characters?. For more information, please follow other related articles on the PHP Chinese website!