Created
May 28, 2017 21:30
-
-
Save kalvian1060/efb96204fa0d6d98f1beaa95a1cdf460 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
include "../koneksi.php"; | |
$fullname = $_POST['fullname']; | |
$username = $_POST['username']; | |
$password = $_POST['password']; | |
$sql ="INSERT INTO user VALUES (null,'$fullname','$username','$password')"; | |
$query=mysql_query($sql); | |
$result = mysql_num_rows($query); | |
$hasil=array(); | |
if($result==1){ | |
$hasil['status']='success'; | |
}else{ | |
$hasil['status']='gagal'; | |
} | |
$data = "{result:".json_encode($hasil)."}"; | |
echo $data; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment