I'm programming a system so an user can edit what he posts. Simplified it's a textarea/input field which stores in a database and a page that retrieves it. The problem is, I think the encoding isn't okay, because strings are stored in the database like "é" or something (phpmyadmin view).
Insert page:
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />- I insert
mysql_real_escape_string($_POST['field']);
Output page:
- Object from database.
htmlspecialchars($object->field);
But expected is: Output page:
- Object from database.
htmlentities($object->field);, right?
Why isn't the data stored in MySql properly?