var app = angular.module("report", []);
function index($scope, $http){
$scope.auth = function(){
$http({
url: '/index.php/users/auth',
method: "POST",
data: {login: $scope.login, password: $scope.password}
}).success(function(data){
alert(data);
});
}
}
This is my AngularJS application. $http doesn't send POST data to the php script.
<?php
class Users extends CI_Controller {
public function auth(){
extract($_POST);
echo $login;
}
}
- This my php script. Codeignitor return that undefined variable 'login'