PDO Conversion

converted database connection and all queries calls to PDO from mysqli