title: AngularJS, PHP form works fine on my own server. inserts blank rows into database on Godaddy
body: <p>I changed the database credentials to match my database, and my user has all privileges. Everything works fine on my own server with Apache and PHPMyadmin. I don't know what to do next.</p>
  
  <p>App.js </p>
  
  <pre><code>  var myapp = angular.module('app', []);
    myapp.controller('submitctrl', function($scope, $http){
      $scope.insertdata=function(){
        $http.post("insert.php", {
          'FirstName':$scope.FirstName,
          'LastName':$scope.LastName,
          'Relation':$scope.Relation,
          'Recommendation':$scope.Recommendation,
          'FundManagementAbility':$scope.FundManagementAbility,
          'MentoringAbility':$scope.MentoringAbility,
          'OrganizationAbility':$scope.OrganizationAbility,
          'MotivationAbility':$scope.MotivationAbility,
          'LocationState':$scope.LocationState,
          'LocationCity':$scope.LocationCity,
          'AdditionalComment':$scope.AdditionalComment})
          .success(function(data, status, headers, config){
           console.log("data inserted!");
  
      });
          $scope.FirstName= '';
          $scope.LastName= '';
          $scope.Relation= '';
          $scope.LocationState= '';
          $scope.LocationCity= '';
          $scope.AdditionalComment= '';
  
     }
  });
  myapp.controller('dbCtrl', ['$scope', '$http', function ($scope, $http) {
    $http.get("ajax.php")
        .success(function(data){
             $scope.data = data;
         })
         .error(function() {
         $scope.data = "error in fetching data";
         });
  }]);
  </code></pre>
  
  <p>insert.php</p>
  
  <pre><code>&lt;?php
  $data = json_decode(file_get_contents("php://input"));
  
  $FirstName = mysql_real_escape_string($data-&gt;FirstName);
  $LastName = mysql_real_escape_string($data-&gt;LastName);
  $Relation = mysql_real_escape_string($data-&gt;Relation);
  $Recommendation = mysql_real_escape_string($data-&gt;Recommendation);
  $FundManagementAbility = mysql_real_escape_string($data-&gt;FundManagementAbility);
  $MentoringAbility = mysql_real_escape_string($data-&gt;MentoringAbility);
  $OrganizationAbility = mysql_real_escape_string($data-&gt;OrganizationAbility);
  $MotivationAbility = mysql_real_escape_string($data-&gt;MotivationAbility);
  $LocationState = mysql_real_escape_string($data-&gt;LocationState);
  $LocationCity = mysql_real_escape_string($data-&gt;LocationCity);
  $AdditionalComment = mysql_real_escape_string($data-&gt;AdditionalComment);
  $connect = mysqli_connect("localhost", "thename", "thepassword", "programmer");
  mysqli_query($connect, "INSERT INTO programmer(`FirstName`, `LastName`, `Relation`, `Recommendation`, `FundManagementAbility`, `MentoringAbility`, `OrganizationAbility`, `MotivationAbility`, `LocationState`, `LocationCity`, `AdditionalComment`)
               VALUES('".$FirstName."', '".$LastName."', '".$Relation."', '".$Recommendation."','".$FundManagementAbility."','".$MentoringAbility."','".$OrganizationAbility."','".$MotivationAbility."','".$LocationState."','".$LocationCity."','".$AdditionalComment."')");
  
  ?&gt;
  </code></pre>