Guest User

Untitled

a guest
May 23rd, 2018
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. <?php
  2. $con = mysqli_connect("localhost", "root", "", "usuarios");
  3.  
  4. $name = $_POST["name"];
  5. $confirpass= $_POST["age"];
  6. $username = $_POST["username"];
  7. $password = $_POST["password"];
  8. $statement = mysqli_prepare($con, "INSERT INTO user (name, username, age, password) VALUES (?, ?, ?, ?)");
  9. mysqli_stmt_bind_param($statement, "ssis", $name, $username, $age, $password);
  10. mysqli_stmt_execute($statement);
  11.  
  12. $response = array();
  13. $response["success"] = true;
  14.  
  15. echo json_encode($response);
  16. ?>
Add Comment
Please, Sign In to add comment