Update viewed.php