When a ' is typed into a text field for example, PHP puts a \ before it.
I'm using the following for filtering:
$comment_body = $_POST['comment_body'];
$comment_body = nl2br(htmlspecialchars($comment_body));
$comment_body = mysqli_real_escape_string($db_conx,$comment_body);
How do I stop this slash from appearing?
mysqli_real_escape_stringfunction call escapes the single quote with the backward slash to prevent SQL injection.