Whats the solution to this problem in php script ?

Discussion in 'PHP' started by hope2life, Aug 31, 2011.

  1. #1
    Hi,

    I upload content on my site using a form in the back end. I use php script to upload content in mysql database and then retrieve it on my website.
    Now what the problem is when I upload, pound sign £(inside the content) display as "?" in the content which is retrieved on the site.
    And this ' also becomes question mark on the website . This really looks bad in website content. Is there any solution to this?

    Any help would be greatly appreciated.

    Thanks!
     
    hope2life, Aug 31, 2011 IP
  2. HowDoYou

    HowDoYou Well-Known Member

    Messages:
    443
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    130
    #2
    look up/google MySQL table character encoding
     
    HowDoYou, Aug 31, 2011 IP
  3. Rukbat

    Rukbat Well-Known Member

    Messages:
    2,908
    Likes Received:
    37
    Best Answers:
    51
    Trophy Points:
    125
    #3
    To store ' in a SQL database, store '' (two of them). You'll retrieve '. As far as £, you can just store (and display) £ On a web page, that produces the £ symbol.
     
    Rukbat, Aug 31, 2011 IP
  4. hope2life

    hope2life Active Member

    Messages:
    1,641
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    90
    #4
    ok thanks. That should help.
     
    hope2life, Aug 31, 2011 IP