i am trying to send multiple data using j query $.ajax method to my php script but i can pass only single data when i concatenate multiple data i get undefined index error i
you can use FormData
take look at my snippet from MVC
var fd = new FormData();
fd.append("ProfilePicture", $("#mydropzone")[0].files[0]);// getting value from form feleds
d.append("id", @(((User) Session["User"]).ID));// getting value from session
$.ajax({
url: '@Url.Action("ChangeUserPicture", "User")',
dataType: "json",
data: fd,//here is your data
processData: false,
contentType: false,
type: 'post',
success: function(data) {},