Update attachments.php