I have a character encoding problem in php, so this is php code:
n_event=$_GET['ndlann']; $nom_complet=htmlentities(stripslashes($_POST['nom'])); $email_comment=htmlentities(stripslashes($_POST['email'])); $titre_comment=htmlentities(stripslashes($_POST['titre'])); $texte_comment=htmlentities(stripslashes(nl2br($_POST['commentaire']))); $pays_comment=$_POST['pays']; $date_ajout=date('Y/m/d');
The data will be added to the database table, you will see that this data comes from the comment form, therefore, when the user enters some comments with orientation language karachayers (Arabic, Hebrew ... etc.), the input data will change something like this :
Ø '' Ø ± ا ع 'ا ¶¶
I tried to remove the htmlentities method, and this works fine, but tackles another problem of protecting comment forms. (js scripts will be executed)
What can I do with this situation?
and thanks
source share