Advertisement
Guest User

Untitled

a guest
May 28th, 2017
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. <?php
  2. include "../koneksi.php";
  3.  
  4. $fullname = $_POST['fullname'];
  5. $username = $_POST['username'];
  6. $password = $_POST['password'];
  7.  
  8. $sql ="INSERT INTO user VALUES (null,'$fullname','$username','$password')";
  9. $query=mysql_query($sql);
  10. $result = mysql_num_rows($query);
  11.  
  12. $hasil=array();
  13.  
  14. if($result==1){
  15. $hasil['status']='success';
  16. }else{
  17. $hasil['status']='gagal';
  18. }
  19. $data = "{result:".json_encode($hasil)."}";
  20. echo $data;
  21. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement