Thank you! I understand solution 2 and might just do that but is solution 1 better? I have searched endlessly but cannot figure out how to correctly do $http callbacks. Any time I get it kinda working, I get a status code 0. I've looked that up and I still don't understand what I am doing wrong, or is my server just not able to process that request?
Here's my javascript:var request = $http({
method : "post",
url : "mywebsite.com/pages/contactForm.php",
data : {
date : $scope.date,
time : $scope.time,
description: $scope.description
}
}).then(function successCallback(response) {
alert("Success");
// this callback will be called asynchronously
// when the response is available
}, function errorCallback(response) {
// called asynchronously if an error occurs
// or server returns response with an error status.
alert("error"+response.status);
});
The php still works, I get the data into my database, but anytime I run this it alerts "error0"