Added amount parameter to posts.php