Ionic, AngularJS Popup

I am just found out an ionic framework and was trying to learn it, but i meet some obstacle that i cannot figure out, tried to search for google does not help me much.

I am trying to create a login form that will be checked to mysql database, but it does not work, i am not sure where is the problem.

Here is my code


<ion-header-bar align-title="center" class="bar-balanced">
   <h1 class="title">Test</h1>
<ion-view title="Sign-In">
  <ion-content class="padding has-header">
          <input type="text" ng-model="username" placeholder="Username">
          <input type="password" ng-model="password" placeholder="Password">

    <button nav-clear class="button button-block button-balanced" ng-click="LogIn()">Login</button>


   // check username or password from database
   $postdata = file_get_contents("php://input");
   $request = json_decode($postdata);
   $user = $request->user;
   $password = $request->password;

  mysql_connect("localhost", "username", "password");
  $results = mysql_query("SELECT name, city FROM tbl_user WHERE   name='".user."' AND city='".$password."' LIMIT 1") or die('{"error":"Login error! Code: 003"}');
  $match  = mysql_num_rows($results);
  if($match > 0 ){
      echo "1";
      echo "0";


angular.module('ionicApp', ['ionic','starter.controllers'])
.config(function($stateProvider, $urlRouterProvider) {


    .state('app', {
       url: "/app",
       abstract: true,
       templateUrl: "templates/menu.html",
       controller: 'AppCtrl'

    .state('login', {
       url: "/login",
       templateUrl: "templates/login.html",
       controller: 'LoginCtrl'



angular.module('starter.controllers', [])

.controller('LoginCtrl', function($scope, $state, $http) {
   $scope.LogIn = function() {
     var request = $http({
        method: "post",
        url: "",
        data: {
        user: $scope.username,
        password: $scope.password
       headers: { 'Content-Type': 'application/x-www-form-urlencoded' }
      /*Successful HTTP post request or not */
      request.success(function (data){
        if (data == '1'){
          $scope.responseMessage = "You are in";
        else {
          $scope.responseMessage = "Username or Password is incorrect";

It cannot popup the message. Someone can point me where is the problem?

Thanks before