Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $con = mysqli_connect("localhost", "root", "", "employee11");
- $name = $_POST["name"];
- $age = $_POST["age"];
- $username = $_POST["username"];
- $password = $_POST["password"];
- $statement = mysqli_prepare($con, "INSERT INTO user (name, username, age, password) VALUES (?, ?, ?, ?)");
- mysqli_stmt_bind_param($statement, "siss", $name, $username, $age, $password);
- mysqli_stmt_execute($statement);
- $response = array();
- $response["success"] = true;
- echo json_encode($response);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement