I’m having a problem in inserting data in php. It sometimes create a character like a black diamond with a question mark.

do you have any idea how can i fix it?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You should have the same encoding everywhere and define it.
Define the charset like this;
and in the header;
You can also write your characters with html characters, however it is always good to define the charset.
If you have
ISO-8859-1(latin1) data in your database, and the rest of the site inUTF-8. Then define the charset-tag as above and use the function utf8_encode() to give the string a properly encoding. There is also a reverse function called utf8_decode()