Avoid SQL injection attacks in PHP using PDO

preview_player
Показать описание

Taken from the course "Build a Complete Registration and Login System using PHP MVC".

How to prevent SQL Injection attacks in PHP using PDO. Use the PDO quote function or prepared statements to avoid the problem.
Рекомендации по теме
Комментарии
Автор

Thanks for this. I was quite concerned about the many pdo ways but I went with prepared statements and works just fine. The video helped me reassure my choice so thanks!

TheHDTitan
Автор

But even the single quote is entered into the prepared statement before it is run, whats going off before you execute, does it just strip them out internally before placing it back into the prepared statement on execute?

suzesiviter
Автор

I usually use prepare() and then directly bind using execute([$value, $value]). Is it okey or should fix my code?

patrick-dev