Fourth revision

Replaced mysql to PDO.