1

Here is my form

<form>
<input class="text_box1" type="text" name="email" ng-model="forget.email" >
<button style="width:auto" class="sign_up" ng-click="doForget(forget)">Get a Password</button>
</form>

Inside my app.js I have

.when('/forget', {
                title: 'forget',
                templateUrl: 'resources/views/forget.php',
                controller: 'authCtrl'
            })

And inside the authCtrl controller

$scope.doForget = function (customer) {
        Data.post('eloquent.php', {
            customer: customer
        }).then(function (results) {
            if (results == "1") 
            {
                $location.path('login');
            }
        });
    };

I am calling eloquent.php

But how can i get the value of email from the forget.php and send to eloquent.php ?

1
  • You can get the value by email = $scope.forget.email; to get the value and you can make it in in local storage and send it to your eloquent.php Commented Jul 14, 2015 at 6:27

1 Answer 1

1

You can get the value of the forgot.email by

forgotemail = $scope.forgot.email;

And then store it in local storage and retrieve there

localStorage.setItem("forgotemail ", "forgotemail ");

And then do the call by

$http.post('eloquent.php', {forgotmail: forgotmail}).then(function (results)
{
//your other code here
}
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.