For the code using PDO rather than ext/mysql, add a common method for creating a connection.
Move everything that should be accessible from the webserver into a public/ directory. Previously the document root was the root of the repository, which is not great.