Problem while inserting special characters into mysql
Posted: Mon Aug 18, 2008 11:49 pm
Hi,
I want to insert a paragraph in one field. But everytime I insert it inserts one the part before the special characters.
I had used htmlentities ,htmlspecialchars & other functions but not able to insert the whole paragraph. But it inserts upto "How do you get started?" only after that it doesn't insert.
the insert stmt:
$sql_query = "INSERT INTO internal_mail(mem_id,message) VALUES (".$mem_id.",'".html_entity_decode($body)."'";
and the $body message to insert is:
Welcome to Mysite.
I am here to help you.
How do you get started?
• The first thing to do is to invite your friends – then when they invite their friends you will all be connected and start having fun! Click Here to invite friends
• Edit your profile – Click Here to edit your Personal, Business and Social Profile
I want to insert a paragraph in one field. But everytime I insert it inserts one the part before the special characters.
I had used htmlentities ,htmlspecialchars & other functions but not able to insert the whole paragraph. But it inserts upto "How do you get started?" only after that it doesn't insert.
the insert stmt:
$sql_query = "INSERT INTO internal_mail(mem_id,message) VALUES (".$mem_id.",'".html_entity_decode($body)."'";
and the $body message to insert is:
Welcome to Mysite.
I am here to help you.
How do you get started?
• The first thing to do is to invite your friends – then when they invite their friends you will all be connected and start having fun! Click Here to invite friends
• Edit your profile – Click Here to edit your Personal, Business and Social Profile