Upon sending an Ajax call to call a php file, I am getting an error on this file:
try {
h.send(b.hasContent && b.data || null)
} catch (i) {
if (c)
throw i
}
This is the error I get:
Failed to load resource: the server responded with a status of 500 (Internal Server Error)
I am sure that the php file I am calling has the correct address since it works on localhost.
Below is the ajax call I am using in jQuery to call the file:
$(document).ready(function(){
$.ajax({
url: 'functions/getParishes.php',
type: 'get',
dataType: 'json',
success:function(response){
var len = response.length;
$('#parish-list').empty()
for( var i = 0; i<len; i++){
$("#parish-list").append("<option value='"+response[i]['ID']+"'>"+response[i]['Name']+"</option>");
}
}
});
});
Can someone please shed a light on what I might be doing wrong?