Advertisement
Guest User

Untitled

a guest
Mar 20th, 2015
254
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. $statement = $pdo->prepare('UPDATE Utilizador SET ativo=:ativo WHERE idUsers=:idUsers');
  2. $arraydados= json_decode($_POST["models"]);
  3. $idUtilizadores = $arraydados[0]->{'idUtilizadores'};
  4. $ativo = 0;
  5.  
  6. $statement->bindParam(':idUtilizadores', $idUtilizadores);
  7. $statement->bindParam(':ativo', $ativo);
  8.  
  9. if($statement->execute())
  10. {
  11. echo "sucess";
  12.  
  13. }
  14. else
  15. {
  16. echo "Error";
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement