Sending multiple data parameters with jQuery AJAX

前端 未结 7 662
一个人的身影
一个人的身影 2020-11-29 22:00

I am sending an ajax request to a php file as shown here:

function checkDB(code, userid)
{

  $.ajax({
  type: \"POST\",
  url: \"

        
7条回答
  •  广开言路
    2020-11-29 22:37

    usually sending your data like this helps:

    data: { code: code, userid: userid }
    

    the most important thing to not forget is to verify if the name of the variables you are sending are the same in the server side

提交回复
热议问题