My function containing a mysql query launched by ajax is not working in wordpress. What am I missing?

I am trying to insert rows into a table I’ve set up based on user’s answers. I have made a child theme and a custom template for the page with the form. My issue is that I have no way of knowing what’s going wrong where and why the data isn’t being inserted. my js onclick function is as follows, and this file is called question_submit.js:

Here is where I enqueue the script:

And finally here is the function that’s binded to the action:

Both of these functions are in my child theme’s functions.php file. Right now I am using hard-coded values jsut to test the functionality, later these values will be dependent on the form answers.

When I click the submit button, there is no change in my table but also no php errors. There is no evidence of the ajax query going through on the XHR section of networks in development tools.

Xin chào các bạn và quý Thầy Cô. Hãy nhập từ khóa mình muốn vào ô tìm kiếm trên Website để tìm kiếm mọi thứ hoặc trên google các bạn hãy nhập từ khóa + dethihsg247.com để tìm kiếm các bài viết của chúng tôi nhé.
  • Hiện tại chúng tôi có hơn 25 nghìn bài văn mẫu các thể loại.
  • Kho tài liệu, đề thi học sinh giỏi các lớp vô cùng phong phú.
  • Mỗi ngày cập nhật hơn 100 đề thi chất lượng từ các website bán tài liệu lớn.

Tải đề thi VIP với giá siêu rẻ tại Vip.Dethihsg247.Com