Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $con = mysqli_connect("fibi.000webhost.com", "id2748657_users", "users", "id2748657_users");
- $username = $_POST["username"];
- $first_name = $_POST["first_name"];
- $last_name = $_POST["last_name"];
- $email = $_POST["email"];
- $password = $_POST["password"];
- $statement = mysqli_prepare($con, "INSERT INTO users (username, first_name, last_name, email, password) VALUES (?, ?, ?, ?,?)");
- mysqli_stmt_bind_param($statement, "sssss", $username, $first_name, $last_name, $email, $password);
- mysqli_stmt_execute($statement);
- $response = array();
- $response["success"] = true;
- echo json_encode($response);
- ?>
- Warning: mysqli_connect(): (HY000/2002): Connection timed out in /storage/ssd1/657/2748657/public_html/register.php on line 2
- Notice: Undefined index: username in /storage/ssd1/657/2748657/public_html/register.php on line 4
- Notice: Undefined index: first_name in /storage/ssd1/657/2748657/public_html/register.php on line 5
- Notice: Undefined index: last_name in /storage/ssd1/657/2748657/public_html/register.php on line 6
- Notice: Undefined index: email in /storage/ssd1/657/2748657/public_html/register.php on line 7
- Notice: Undefined index: password in /storage/ssd1/657/2748657/public_html/register.php on line 8
- Warning: mysqli_prepare() expects parameter 1 to be mysqli, boolean given in /storage/ssd1/657/2748657/public_html/register.php on line 10
- Warning: mysqli_stmt_bind_param() expects parameter 1 to be mysqli_stmt, null given in /storage/ssd1/657/2748657/public_html/register.php on line 11
- Warning: mysqli_stmt_execute() expects parameter 1 to be mysqli_stmt, null given in /storage/ssd1/657/2748657/public_html/register.php on line 12
- {"success":true}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement