我在使用PHP在mysql data_base中插入urdu新闻时遇到问题 的 HTML
<form method="post" action="">
<textarea name="content">Insert news article here.</textarea>
<input type="submit" value="Submit"/>
PHP
$content = $_POST['content']; $queryNews = "INSERT INTO yob_news (title, content, date) VALUES('$title','$content','$date')";
mysql_query($queryNews);
插入后
已添加<meta http-equiv=”Content-Type” content=”text/html; charset=UTF-8"/>
答案 0 :(得分:2)
我认为这应该适合你:
mysql_query("SET NAMES 'utf8'");
否则你可以试试这些:
mysqli_set_charset($con,"utf8");
mysql_query ("set character_set_results='utf8'");
ini_set("default_charset", "UTF-8");
header('Content-type: text/html; charset=UTF-8');