Advertisement
Guest User

Untitled

a guest
Dec 30th, 2016
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. <?php
  2. $con = mysqli_connect("localhost", "root", "", "kulturnik");
  3.  
  4. $name = $_POST["name"];
  5. $username = $_POST["username"];
  6. $password = $_POST["password"];
  7. $statement = mysqli_prepare($con, "INSERT INTO user (name, username, password) VALUES (?, ?, ?)");
  8. mysqli_stmt_bind_param($statement, "sss", $name, $username, $password);
  9. mysqli_stmt_execute($statement);
  10.  
  11. $response = array();
  12. $response["success"] = true;
  13.  
  14. print_r(json_encode($response));
  15. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement