I've got a very simple contact form that I am sending with an AJAX call...the only problem is that it isn't sending properly and I'm not catching any errors.
Relevant chunk of JavaScript:
$('#feedbackSubmit').click(function() {
//send the stuff
$.ajax({
type: "GET",
url: "./br.php",
data: { 'name': $('#fName').val(),
'email': $('#email').val(),
'subject': $('#subject').val(),
'message': $('#message').val()
}
});
Relevant chunk of PHP:
$fName = $_GET["name"];
$from = $_GET["email"];
$sub = $_GET["subject"];
if($_GET['desc']) {
$desc = $_GET["desc"];
//formatting of the body of the mail
}
else {
$desc = $_GET["message"];
//format the body again
}
Maybe I'm just burned out looking at this, but I can't seem to find what's causing the problem...
Notes: Tried with GET and POST...tried with PHP file at level of call and level of template.