$.ajax({ type: "POST", url: "posts.php", dataType: "json", data: {postID: postID, action: action, mission: mission}, success: function(response) { if (response.success) { loadPosts(); } } });