Advertisement
Guest User

Untitled

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