WordPress Insert line in DB when clicking a button

There are many problems here. Resolving one leads to another. Uncaught ReferenceError: response is not defined In your JavaScript code, you set the success key to a function function (data) { $(“#result”).html(response); } response is not defined. The callback has a function parameter of data, not response. This causes the error. .html(…) sets the HTML … Read more