Link to home
Avatar of Steve Tinsley
Steve TinsleyFlag 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
ASKER CERTIFIED SOLUTION
Avatar of Ahmed Merghani
Ahmed Merghani
Flag of Sudan image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
SOLUTION
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
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