Insert information to MySQL using PHP in a foreign language

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mohammedsk
    New Member
    • Dec 2006
    • 7

    Insert information to MySQL using PHP in a foreign language

    Hi,
    I am trying to save information into MySQL using PHP. The data I am saving is in Arabic language.
    The database table will show some "???" or other characters.
    If I insert the text directly through PHPMyAdmin it works, but not through PHP.
    I also, modified the PHP page to accept UTF-8 encoding.


    What other changes do I have to do?

    Thanks in advance,
  • mohammedsk
    New Member
    • Dec 2006
    • 7

    #2
    Never mind, I figured it out.
    I had to use mysql_query("SE T NAMES 'utf8'");

    Comment

    Working...