how to send multiple data with $.ajax() jquery

后端 未结 9 1719
臣服心动
臣服心动 2020-11-27 03:07

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

9条回答
  •  失恋的感觉
    2020-11-27 03:34

    Change var data = 'id='+ id & 'name='+ name; as below,

    use this instead.....

    var data = "id="+ id + "&name=" + name;
    

    this will going to work fine:)

提交回复
热议问题