Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $con = mysqli_connect("database", "host", "username", "password");
- $firstname = $_POST["firstname"];
- $lastname = $_POST["lastname"];
- $email = $_POST["email"];
- $username = $_POST["username"];
- $password = $_POST["password"];
- $bio = $_POST["bio"];
- $university = $_POST["university"];
- $illness = $_POST["illness"];
- $symptoms = $_POST["symptoms"];
- $statement = mysqli_prepare($con, "INSERT INTO users (firstname, lastname, email, username, password, bio, university, illness, symptoms) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)");
- mysqli_stmt_bind_param($statement, "sssssssss", $firstname, $lastname, $email, $username, $password, $bio, $university, $illness, $symptoms);
- mysqli_stmt_execute($statement);
- $response = array();
- $response["success"] = true;
- echo json_encode($response); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement