PDO Extension in PHP
There are two approaches for working with a database in PHP: mysqli, which you already know, and PDO. In this section of the site we will study the PDO extension, which stands for PHP Data Objects.
The PDO extension allows you to work with a database through OOP. In addition, it provides a convenient mechanism for preventing SQL injections.