0

https://pasteboard.co/IVAyRyij.png

I'm trying to send form data to PHP but I just get undefined as form data. Please help.

My HTML:

<div class="account-wall"> <img class="profile-img" src="img/male.png" alt=""> <form class="form-signin" role="form" ng-submit="login('Restraunt')"> <input type="text" class="form-control" ng-model="user" placeholder="User Name" required > <input type="password" class="form-control" ng-model="pass" placeholder="Password" required> <button type="submit" class="btn btn-lg btn-primary btn-block">Sign in</button> <label class="checkbox pull-left"> <input type="checkbox" value="remember-me">Remember me </label> <a href="#" class="pull-right need-help">Need help? </a><span class="clearfix"></span> </form> </div> 

My ui-view:

.state("app.admin", { url: "/admin", views: { sub: { templateUrl: "templates/admin.html" } } }) 

My Controllers:

$scope.login=function (type2) { $http2.post($rootScope.url+"login.php",{ type:type2, user:$scope.user, pass:$scope.pass }).then(function (resp) 
3
  • Input name="" missing?
    – vadivel a
    CommentedFeb 20, 2020 at 17:41
  • Is $http2.post a typo?
    – georgeawg
    CommentedFeb 20, 2020 at 19:32
  • What does the Network Tab of the Developer Console show?
    – georgeawg
    CommentedFeb 20, 2020 at 19:36

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.