Advertisement
Guest User

updateMember.php

a guest
Aug 19th, 2016
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. <?php
  2. include "koneksi.php";
  3. $response = array();
  4.  
  5. $id = $_POST["id_user"];
  6. $nama = $_POST["nama"];
  7. $email = $_POST["email"];
  8. $password = $_POST["password"];
  9. $sql = mysql_query("UPDATE user SET nama='$nama', email='$email', password = '$password' WHERE id_user='$id'");
  10.  
  11. if($sql)
  12. {
  13. $response["success"] = 1;
  14. $response["message"] = "Data berhasil di Update";
  15. echo json_encode($response);
  16. }else{
  17. $response["success"] = 0;
  18. $response["message"] = "Data gagal di Update";
  19. echo json_encode($response);
  20. }
  21.  
  22. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement