new classes

php db and log classes
updated index.php to include examples of the db api usage