I am using PDO to users input, but right now I'm not using PDO when displaying content from my MySQL database (still the old fashioned way with SQL commands..).
Is it necessary to filter/sanitiza inputs from users when inserting data to a MySQL database?
AND, if the way to go is to sanitize the output instead, then what is the best way to sanitize output? Am I good to go, if I just use htmlspecialchars()
or do i need to use strip_tags()
and other things also?
I am using placeholders and prepared statements.
Thank you.