Added gallery.php and insert logic

Added gallery.php to repository, and added database insert logic to result.php.