I have a php script that responds to a file being uploaded. I want to 'echo' this response but I can't get it to work
As you can see in the script below I used ' response ' because I couldn't think of anything. How does this work?
success:function(response){
if(response == 6563){
var uploaddiv = document.getElementById('uploadattachment');
uploaddiv.innerHTML = '<center><br><br><span style="font-size:18px; color:green;">File has successfully been uploaded.</span><br>You can now click this window away or upload another file</center>';
} else {
var uploaddiv = document.getElementById('uploadattachment');
uploaddiv.innerHTML = '<center><br><br><span style="font-size:18px; color:red;">Oops, something went wrong</span><br>' response '</center>';
}