When a user enters some details I am trying to add them to the database via a POST to a file called registerNewUser.php
However the POST never succeeds. I'm simply given a 404. Here is the post code:
$http({
method: 'POST',
url: '../../php/login/registerNewUser.php',
data: newUser,
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
}
}).success(function(data, status) {
console.log("success");
}).error(function(status) {
console.log("ERROR");
});
I have tried moving setting the url to /registerNewUser.php
and moving registerNewUser.php
to the base directory but still no luck. Any help would be greatly appreciated.