Class exercise for PHP / MySQL