Data needs to be an object.
Example:
stop: function(){
$.ajax({
type: "POST",
data: {name: name, lastname: lastname},
url: "ajax.php",
});
}
In case of form could be:
data: $('#form').serialize();
0
solved How to get data from ajax? [closed]