0

I am inserting data into a MySQL Table using PHP/SQL Queries and when i use a £ (pound) symbol its inserting a  character before so it looks like

£ then the rest of the string

My SQL Query is just simple:

$sql="INSERT into table (column1, column2) values (value1, value2)";
$rs=mysql_query($sql,$conn);

is there any way i can stop the  from inserting into the MySQL table?

Thanks

charlie
  • 1,356
  • 7
  • 38
  • 76
  • what is the collation type of the field? Moreover, make sure your string stores the pound sign in proper format. It's also a good practice to make your headers utf-8 by adding this to the top of your php file: header('Content-Type: text/html; charset=utf-8'); – Raja Amer Khan Sep 11 '13 at 08:46
  • Try to trim the values before using it in the insert query. – Nitesh Gupta Sep 11 '13 at 09:03

0 Answers0