There is a code, it receives the text by post-request:
$msg = isset($_POST['usersmsg']) ? $_POST['usersmsg'] : false; if ($msg) { $result = mysql_query("INSERT INTO msgs (did,sid,text) VALUES('$did','$sid','$msg')",$db); All characters are correctly added, but "+" is not added, instead of it a space is written in the base. Base coding utf8_unicode_ci
Example:
As I understand the problem with the encoding, the meta tags are worth
<meta charset="UTF-8"> When connecting to the database:
mysql_query("SET NAMES 'utf8'"); mysql_query("SET CHARACTER SET 'utf8'"); mysql_query("SET SESSION collation_connection = 'utf8_general_ci'"); Please tell me what the problem is, in which direction should I google?

$msgin SQL-code in this way, because you get a SQL injection: some hacker will send a message'); DELETE from msgs; --'); DELETE from msgs; --'); DELETE from msgs; --- and your base crying. Read Google about screening SQL, about mysqli (PHP's mysql module has long been outdated), about PDO and about placeholders in order to make the code safer. - andreymal