I have a problem with php & mysql, insert to database using utf-8. first file: addsite:
add this line:
mysql_query("SET NAMES 'utf8'");
Like this
if(!(@mysql_connect("$host","$user","$pass") && @mysql_select_db("$tablename"))) {
?>
<html>
MSQL ERROR
<?
exit;
}
else{
mysql_query("SET NAMES 'utf8'");
}
Also: - Add meta charset to the form page
<meta http-equiv='Content-Type' content='text/html; charset=utf-8'>
or HTML5
<meta charset='utf-8'>