I have an add_post
form which include post_title
, post_content
and date
. post_content
may contain special_characters and HTML elements
There is a problem to store into post_content
Example string:
gyms revolve around this unique factor called “Community.”
If I try to insert that string into the database table the following string is inserted for instance:
gyms revolve around this unique factor called
Because of the symbols (“
”
’
) I am not able to insert the all data
I just want to remove these symbols so that I would be able to add all post_content
data
This is what I have tried:
$post_content=$_POST['post_content'];
$post_content=addslashes($post_content);
$post_content=htmlentities($post_content);