i'm tring to insert into my database the following string: "รจ" but each time i try in the database nothing is added. This is the code that i use to insert.
$string = mysql_real_escape_string($_REQUEST['string_passed']);
$query = "UPDATE my_table SET my_field = '$string' WHERE id = '$id'";
In my connection.inc.php file i have following code.
mysql_connect("localhost", "root", "") or die("Problem: ".mysql_error());
mysql_select_db("my_db") or die("Poblem: ".mysql_error());
mysql_query('SET NAMES utf8');
I know, i can insert $string
using htmlentities
but there is any other solution?