Reputation: 665
I am inserting data from an html editor into my database. I have html purifier setup but have removed it for the example because the problem exists regardless.
GLOBAL $DB;
$queryHandle = $DB->prepare("UPDATE support SET
help = :help
WHERE id = :id");
$queryHandle->BindParam(':id', $id);
$queryHandle->BindParam(':help', PDO::PARAM_STR);
$queryHandle->execute();
$queryHandle->setFetchMode(PDO::FETCH_ASSOC);
return $queryHandle;
}
Help is the html text. Locally it works fine. When I upload my site to my server, the html comes out with \'s behind every quote. I do not have magic quotes or any other sanitization setup. Any suggestions?
Upvotes: 1
Views: 60
Reputation: 211670
You have magic quotes turned on which means your server is misconfigured. Turn it off.
Upvotes: 1