this is my Code inside a html file:
<script>
$(document).ready(function (event)
{
$(document).on("click", ".interestbutton", function(e)
{
var docID = e.target.parentNode.parentNode.id;
$.ajax({
type: "POST",
url: "interest.php",
data: {docID },
success: function(data) {
console.log("done");
}
});
});
});
</script>
The "console.log" works but nothing inside my php file does. Any ideas?
Best regards
console.log("done")is working then the problem must be in the php file. Could you post it?console.log(data)in your success function? What happens when you navigate directly to interest.php? Did you double check the path to the file? Is there a .htaccess file in the directory?