Avatar of Steve Tinsley
Steve Tinsley
Flag for United Kingdom of Great Britain and Northern Ireland asked on

Recording £ sign to mySQL DB with PHP

I am having trouble recording £ signs to mySQL with PHP. What is the best method??
I have tried have my mySQL field as TEXT or VARCHAR but noting works correctly.
The field is going to have a comment in (which could be long) which may include any character from the keyboard (eg: !@£$%^&*(*)_+ etc.....)

Currently I am getting: ¿ or  signs!

Could someone help.

Thanks

Steve
PHPMySQL Server

Avatar of undefined
Last Comment
Ray Paseur

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Ahmed Merghani

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
SOLUTION
Ray Paseur

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Ray Paseur

Thanks for the points and thanks for using EE.

To anyone viewing this question and answer in the future, there is no need to escape the £ signs.  There is also no harm in escaping the £ signs.  The escape functionality is described in the link shown at ID: 39020669 and while proper escape is a necessary "best practice" it is irrelevant to this issue.

Best to all, ~Ray
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck