https://jumnuoy.blogspot.com/2012/12/databsae-insert-unicode-character-in.html
<?phpand set proper charset in the HTML Head section
$dbhost = 'localhost';
$dbuser = 'root';
$dbpwd = '';
$dbname = 'test';
$dbConn = mysql_connect ($dbhost, $dbuser, $dbpwd) or die ('MySQL connect failed. ' . mysql_error());
mysql_select_db($dbname) or die('Cannot select database. ' . mysql_error());
mysql_query("SET NAMES utf8");
function dbQuery($sql)
mysql_query("SET NAMES utf8"); //the main trick
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<?phpand set proper charset in the HTML Head section
$dbhost = 'localhost';
$dbuser = 'root';
$dbpwd = '';
$dbname = 'test';
$dbConn = mysql_connect ($dbhost, $dbuser, $dbpwd) or die ('MySQL connect failed. ' . mysql_error());
mysql_select_db($dbname) or die('Cannot select database. ' . mysql_error());
mysql_query("SET NAMES utf8");
function dbQuery($sql)
mysql_query("SET NAMES utf8"); //the main trick
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
Khmer
Khmer Unicode
MySQL
PHP
ចំណុចគួរយល់ដឹង
0 comments:
Post a Comment