What is the best way to prevent SQL-injection in PHP 8?
the only way that I know is Prepared statement
.
https://www.php.net/manual/en/mysqli.quickstart.prepared-statements.php
I want to know is there any other way to prevent SQL-injection in PHP-8?
I see these methods are for PHP 5 and PHP 7 to prevent SQL injection. but what should we do in PHP 8?
mysqli::real_escape_string
mysqli::escape_string
mysqli_real_escape_string
(PHP 5, PHP 7)
https://www.php.net/manual/en/mysqli.real-escape-string.php
it's not still deprecated but we should use it very carefully.
Is there any other way in PHP-8?