Advertisement
Guest User

Untitled

a guest
Dec 27th, 2016
95
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", "", "employee11");
  3. $name = $_POST["name"];
  4. $age = $_POST["age"];
  5. $username = $_POST["username"];
  6. $password = $_POST["password"];
  7. $statement = mysqli_prepare($con, "INSERT INTO user (name, username, age, password) VALUES (?, ?, ?, ?)");
  8. mysqli_stmt_bind_param($statement, "siss", $name, $username, $age, $password);
  9. mysqli_stmt_execute($statement);
  10.  
  11. $response = array();
  12. $response["success"] = true;
  13.  
  14. echo json_encode($response);
  15. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement