Hi All,
I'm working on a form that should allow the user to insert a brief description of a picture. The user is allowed to write text in several languages so i need to be able to store (in a db) and then display accented letters like è, ü etc.
Problem is that when I try to display them, characters appear in a different way (eg, like a capital "A" with a tilde on top etc.)
the code performs the following operations on the text inserted in the form:
$title = htmlentities($_POST['title']);
if (!get_magic_quotes_gpc()) {
$title = mysql_real_escape_string($title);
}
// ...then it saves it to DB
What I get is that a text like "è ü à" becomes "è ü à " which don't think is correct and doesn't display correctly when i try to pront it, even using html_entity_decode.
What am I doing wrong?
I've tried inverting the two instructions (ie mysql_real_escape_string before htmlentitites) but didn't work.
thanks,
Patrick