how to send multiple data in ajax request in XMLHttpRequest code example
Example: ajax send multiple data to php
$.ajax({
url: "/something",
type: "GET",
data: {p1: "value1", p2: "value2"}, // multiple data we want to send
success: function(data){
console.log(data);
}
}).done(function(){
console.log("Success.");
}).fail(function(){
console.log("An error has occurred.");
}).always(function(){
console.log("Complete.");
});