Whenever the Ajax runs, it says everything works well but as far as I can tell It's not loading the PHP file.
The console has no errors or warning.
Ajax is running the success command
PHP file (download.php)
<script>console.log("Hello?")</script>
<?php
if(isset($_POST['files']) ){
echo $_POST['files'];
}
?>
JS
function downloads(){
files = tickboxes();
if( isset(files) ){
$.ajax({
data: "files=" + files,
type: "POST",
url: "./assets/php/download.php",
success: function(response) {
console.log("Download Passed Successfully");
}
});
} else {
alert("Download", "No Files Selected", "red");
}
}
HTML
<a onclick="downloads()" id="delete" class='btn btn-default'><image src='./assets/images/download.svg'></image> Download</a>