Ionic app send form data to mysql

I have written a code to send the form data of an ionic application with angularjs to mysql. My code works fine, but only empty records are inserted to mysql These are the codes:

form.html

<div class="list"> 
<form>
<div><input type="text" ng-model="h" ></div>
<div><input type="text" ng-model="s"></div>

<button ng-click='SignUp();'>SignUp</button>
</form>
</div>

App.js

.controller('SearchCntrl', function($scope, $http) {

 $scope.SignUp = function() {

 $http.post('http://www.qatarperfectmedia.com/channel/postdata.php',
 {'h':$scope.h, 's':$scope.s}
 ).success(function(data, status, headers, config) {

    if (data.msg != '')
       {
         $scope.msgs.push(data.msg);
       }
    else
       {
         $scope.errors.push(data.error);
       }
      }).error(function(data, status) {
         $scope.errors.push(status);
       });
}
})

postdata.php

 $data = json_decode(file_get_contents("php://input"));
 $hospital = mysql_real_escape_string($data->h);
 $specialty = mysql_real_escape_string($data->h);
 $qry = 'INSERT INTO doctors (hospital,specialty) 
 values ("'.$hospital.'","'.$specialty.'")';

 $qry_res = mysql_query($qry);
 if ($qry_res) {
    $arr = array('msg' => "User Created Successfully!!!", 'error' => '');
    $jsn = json_encode($arr);
    print_r($jsn);
} else {
    $arr = array('msg' => "", 'error' => 'Error In inserting');
    $jsn = json_encode($arr);
    print_r($jsn);
}

The problem i face is when form submitted, only empty records are being inserted to database. Thnk you

I figured it out passing the values via url, and this works perfect

html page

<div class="list"> 
<form>
<div><input type="text" ng-model="input.h" ></div>
<div><input type="text" ng-model="input.s"></div>

<button ng-click="SignUp(input);">SignUp</button>
</form>
</div>

Controller

.controller('SearchCntrl', function($scope, $http) {
$scope.SignUp= function (input){  
enter code here
$http.post("http://www.casda.com/postdata.php?first="+input.h+"&second="+input.s).success(function(data){
$scope.tasks = data;
});
}
});

postdata.php

//get data from url

if(isset($_GET['first'])){

$foo= $_GET['first'];
$foo1= $_GET['second'];
}
// other query code