Implementing a PHP Ticketing System