When I insert any text written in unicode into the database, they become question marks. Database encoding is set to utf-8. What else could be wrong? When I check phpmyadmin, only question marks appear!
This is the code I use to connect to the database:
define ("DB_HOST", "localhost"); // set database host
define ("DB_USER", "root"); // set database user
define ("DB_PASS","password"); // set database password
define ("DB_NAME","name"); // set database name
$link = mysql_connect(DB_HOST, DB_USER, DB_PASS) or die("Couldn't make connection.");
$db = mysql_select_db(DB_NAME, $link) or die("Couldn't select database");
mysql_set_charset('utf8',$link);
mysql_query("SET CHARACTER SET utf8");
source
share