Hi I have this query where I am inserting information into a database. Submitting the form works as intended. However, when using ' (apostrophes) within the text entered, I receive a PDOException SQLSTATE[42000] Syntax error or access violation: 1064
$result = $conn->prepare("UPDATE `news_articles`
SET `postedby`=:postedby,`title`=:title,
`short_title`=:short_title,
`article_image`=:article_image,
`contents`=:contents,
`datetime`=:datetime,
`event_datetime`=:event_datetime,
`type`=:type
WHERE `articleid`=:articleid");
$result->bindParam(':articleid', $articleid);
$result->bindParam(':postedby', $postedby);
$result->bindParam(':title', $title);
$result->bindParam(':short_title', $short_title);
$result->bindParam(':article_image', $article_image);
$result->bindParam(':contents', $contents);
$result->bindParam(':datetime', $datetime);
$result->bindParam(':event_datetime', $event_datetime);
$result->bindParam(':type', $type);
$result->execute();
Does anybody know why this is?