I am trying to set the absolute path to the url so that it loads from domain.com/functions/contact.php, but when I do so I get a 500 server status error
$.ajax({
url: "/functions/contact.php",
type: "post",
data: {stage : optionScope.data().stage,
topics: optionScope.data().topic,
mentor: optionScope.data().mentor,
fname: $('#fname').val(),
email: $('#email').val(),
humancheck: $('#humancheck').val()
},
success: function (response) {
console.log("data sent successfully");
window.location = response;
},
error: function (xhr, desc, err) {
console.log(xhr);
console.log("Details: " + desc + "
Error:" + err);
}
});