Advertisement
Guest User

Untitled

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