I am trying to come up with a function that I can pass all my strings through to sanitize. So that the string that comes out of it will be safe for database insertion. But t
what about this
$string = htmlspecialchars(strip_tags($_POST['example']));
or this
$string = htmlentities($_POST['example'], ENT_QUOTES, 'UTF-8');