Finally figured out how to make attachment.php display the attachment