I have a jquery post function that returns a response on success after the click of a div. However, I would like to return multiple variables on success. Do I have to use JSON, and if so, is it possible to integrate it into the $.ajax function after success?
$.ajax({
type: "POST",
data: "action=favorite&username=" + username + "&topic_id=" + topic_id + "&token=" + token,
url: "favorite.php",
success: function(response)
{
}
});
EDIT I appreciate everyone's help + 1 to all!