title: AngularJS - PHP - failed insert data (localStorage) into mysql Database
body: <p>I just store the input data into the Local Storage. 
  With $http.post I just get the data and post them to my backend.php</p>
  
  <pre><code>$scope.insertdata=function() {
        $scope.stored = localStorage.getItem('todos');
  
        $http.post("backend.php", {'dataTodos': $scope.stored})
        .success(function(data,status,headers,config) {
          console.log('Success!');
        });
      }
  </code></pre>
  
  <p>Here is my backend.php</p>
  
  <pre><code>$data = json_decode(file_get_contents("php://input"));
  $storedTodos = mysql_real_escape_string($data-&gt;dataTodos);
  
  mysql_connect("localhost", "root","");
  mysql_select_db("div");
  mysql_query("INSERT INTO ontodos(`todo`) VALUES('".$storedTodos."')");
  </code></pre>
  
  <p>The browser log (success), nothing else, </p>
  
  <p>but my database is empty. Who is the error?? Hope anyone can help me.</p>