PDO(PHP Data Object)  : PDO is a PHP extension for accessing databases in PHP. Advantages: 1) Security : In MYSQL connection we manually sanitise using mysql_real_escape_string() functions in order to avoid SQL injections. But with PDO this is all taken care for us and means we no longer have to worry about SQL injection. 2) Performance : PDO…