Quote:
Code always saves the records to the database.
Which means that the code for ajax is working fine, as it sends the data to other page (
or wherever ajax is submitting the data) then the problem comes is that response is not shown.
The problem, any problem that you may encounter in web development is always logged in the console. Press
F12 to get the console in developer tools, and see if that event is logged there. Perhaps, in most cases you are not sending anything back, an if...else may change the logic or path of the program.
Anyways, check the console there may be a reason for each and every event. Secondly, in the networking tab, see for the logs of your requests. Each request, along with their status code is shown, see what response was sent from server (
if any!). This would help you to bring down the problem into one single logical error that you can solve.