I got
$id = (int) $_POST['id']
$content = filter_input(INPUT_POST, 'post_content', FILTER_SANITIZE_STRING);
The above, is making my $content string secured, when I post it to the database:
$conn->new->query("UPDATE `posts` SET `content` = " . $conn->escape_string($content) . " where `id` = {$id};");
But at the same, is does remove some special characters like tags, for example I can not use <
in my post , because it'll be removed.
How can I modify that, to be secured enough and at the same prevent my code from hack?