I've got a form, when filled out with and apostrophe like don't, will not pass into my db. I don't want to have to add backslashes each time I enter an apostrophe, so how can I fix this?
Here's the sql statement.
Code: Select all
$sql ="INSERT INTO `testTable` values ('', '$_POST[headline]','$_POST[content]')";
if (mysql_query($sql,$conn)){
echo "records added!";
}else{
echo "something went wrong";
}