Is there any modification when creating or getting a JSON object in PHP?
I have the following code:
Angular:
$scope.atualizaUsuario = function(usuario) {
$window.localStorage.setItem("nome", usuario.nome);
$window.localStorage.setItem("usuario", usuario.usuario);
$window.localStorage.setItem("email", usuario.email);
var nome = $window.localStorage.getItem("nome", nome);
var usuario = $window.localStorage.getItem("usuario", usuario);
var email = $window.localStorage.getItem("email", email);
var idUsuario = $window.localStorage.getItem("idUsuario", idUsuario);
usuario = {
"idUsuario":idUsuario,
"nome":nome,
"usuario":usuario,
"email":email
}
$http.put("http://www.vigilantescomunitarios.com/php/atualizaUsuario.php", usuario).success(function (data){
console.log(data);
$location.path("/ajustes");
})
}
Then ...
<?php
$postdata = file_get_contents("php://input");
$request = json_decode($postdata);
$idUsuario = $request->idUsuario;
$name = $request->name;
$usuario = $request->usuario;
$email = $request->email;
$pass = $request->pass;
I ask this question, because in the php logo appears this message:
Does anyone know why this is? Thanks.