Jquery ajax call from javascript to PHP

前端 未结 4 2078
失恋的感觉
失恋的感觉 2020-12-18 14:02

There seems to be a problem with the code I have for calling php from javascript with jquery ajax. The ajax call seems to be successful but I don\'t get the correct informa

4条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-18 14:41

    I send back the query as a reponse to debug it before performing a delete query.

    ...

    this ajax call returns an empty string and causes the div in the HTML to disappear.

    I assume you want the query displayed inside your div. You need echo($sql); or echo(uptree()); or equivalent somewhere in your program. You might also create an HTML form that POSTs the same data as your AJAX to see what PHP is returning.

提交回复
热议问题