I saved some text to SQL database after filtering it with the code below to prevent SQL injection.
$text = htmlspecialchars(htmlentities($_POST['inputedTextToSave']));
$text = mysqli_real_escape_string($conn,$text);
Think that I am inserting the following string using the form;
The number 3 > 1
Now I want to read the data from the database. When I echo out the text from the database it displays it as follows.
The number 3 > 1
How can I prevent this and make the text display correctly without symbols and all that.