Check your formdata, this is not a solution but will help you debug your own code.
<script type="text/javascript">
$(document).ready(function(e){
$('#upload').click(function(e){
var formData = new FormData($('form')[0]);
var page = $("#machine option:selected").val();
//check the output here
e.preventDefault();
console.log("formData",formData)
$.ajax({
url: page,
type: 'POST',
data: formData,
cache: false,
contenType: false,
processData: false,
success: function(data){
$("#information").empty();
$("#information").append(data);
}
});
});
})
3
solved Ajax upload not executing the PHP script [duplicate]