Skip to content
Permalink
cbc7c542a7
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
19 lines (17 sloc) 677 Bytes
<?php
$con = mysqli_connect("localhost", "id3757086_300cem", "300cem", "id3757086_300cem");
$name = $_POST["firstname"];
$surname = $_POST["lastname"];
$email = $_POST["email"];
$username = $_POST["username"];
$password = $_POST["password"];
$statement = mysqli_prepare($con, "INSERT INTO user (`username`, `firstname`, `lastname`, `password`) VALUES (?, ?, ?, ?)");
mysqli_stmt_bind_param($statement, "ssss", $username, $name, $surname, $password);
mysqli_stmt_execute($statement);
if($statement != false){
$response = array();
$response["success"] = true;
}
echo json_encode($response);
echo mysqli_connect_error()
?>