Please Help me :mysql_real_escape_string Problem..

Discussion in 'PHP' started by kaleelkr, Jan 24, 2010.

  1. #1
    Hello, My name is kaleel, I need a help

    for my website i am using malayalam language font. when writing malayalam there including all special carectors ( like ' " / ? , .....). but i can't insert this carectors to my database. when i am using mysql_real_escape_string() there adding slashes in front of quates .but when adding slash there making change of my language ( bcoz Slash using for another word in my language ) . so how i solve my problem.

    how i include quates without adding slash in front of that..



    sorry for bad english
     
    kaleelkr, Jan 24, 2010 IP
  2. SmallPotatoes

    SmallPotatoes Peon

    Messages:
    1,321
    Likes Received:
    41
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Is there a reason why you cannot you use Unicode instead? Using these hokey 1980s homemade encodings just causes all kinds of problems.

    Switch to unicode and suddenly you can mix English and Malayam in the same field, and all the problems you describe go away.
     
    SmallPotatoes, Jan 24, 2010 IP
  3. hasanbasri

    hasanbasri Peon

    Messages:
    78
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    yah
    change your database encoding to utf-8,unicode_general_ci;
    also in your conf.php file when you connect to database use
    mysql_query("set character_set_server 'utf8'"); //
    mysql_query ("set names 'utf8'");//

    I hope this help
     
    hasanbasri, Jan 26, 2010 IP