i'm getting started to mysql/php. (from K. Yank's book)
I finally got to learn how to retrieve data from mysql, but i got this:
What was written in mysql was:
First, these strange characters also apeared in mysql, but i went to "my" file and added this:
Now, in mysql these characters dont appear anymore. They appear in my web page.
Do you think the problem lies in mysql or in php configurations?
What is the solution?
thanks in advance
i guess i didnt made myself clear enough.
Let me try:
in my language (portuguese), apple writes==maçã.
If i make an insert (using DOS) in mySQL writting 'maçã', when i use a php script to read the database, in my web page i get: 'ma‡Æ', which is ilegible!!!.
On the other hand, if i use a php script to store data in the database and in the web page i insert the correct word 'maçã', when i retrieve the data, i can read in a web page the right word 'maçã', but if i go to the DOS window and i read the database, in mySQL the word written for 'maçã' is: 'maþÒ'.
I tried the following solutions (none resulted)
1) went to 'my' mySQL file and wrote:
2) went to php.ini and and under data handling, wrote:
default_charset = "iso-8859-1"
How can i overcome this?
Can anyone help please?
You mean i should use character entities when?
a)writing in dos/mySQL,
b)in php scripts?
i wonder, is there something like this asp function:
in php or in mySQL?