Advertisement
Guest User

Untitled

a guest
Apr 16th, 2016
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. $con = mysqli_connect("mysql10.000webhost.com", "a3288368_user", "abcd1234", "a3288368_data");
  2.  
  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, age, username, password) VALUES (?, ?, ?, ?)");
  8. mysqli_stmt_bind_param($statement, "siss", $name, $age, $username, $password);
  9. mysqli_stmt_execute($statement);
  10.  
  11. $response = array();
  12. $response["success"] = true;
  13.  
  14. echo json_encode($response);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement