I'm trying to save the contents of a WYSIWYG input into an Oracle database. Here's what I'm using:
$data = htmlentities($_POST['data'], ENT_QUOTES, "UTF-8");
My expectation is that when I'm going to put John's as the value for the input, it will be saved on the database as John's, but instead it is being saved as John'.
To me it looks like a double HTML entity encoding issue.
Can you help me fix this?
var_dump($data)(also,var_dump($_POST['data'])) and look for it's output to be sure.'s to their entity, hopefully not to avoid SQL injections?htmlentities. The only reason why I'm trying to escape'is because on my query I use single quotes to denote strings.