1
Mistakes:
Warning: mysqli_stmt_bind_param() expects Parameter 1 to be mysqli_stmt, Boolean Given in /home/a9630388/public_html/Register.php on line 7
Free Web Hosting
PHP Error Message
Warning: mysqli_stmt_execute() expects Parameter 1 to be mysqli_stmt, Boolean Given in /home/a9630388/public_html/Register.php on line 8
Free Web Hosting {"Success":true}
Code:
<?php
$con = mysqli_connect("CONFIDENCIAL");
$email = $_POST["email"];
$senha = $_POST["senha"];
$statement = mysqli_prepare($con, "INSERT INTO user (email, senha) VALUES(?, ?)");
mysqli_stmt_bind_param($statement, "siss", $email, $senha);
mysqli_stmt_execute($statement);
$response = array();
$response["success"] = true;
echo json_encode($response);
?>
It says the error is on line 7 and 8. Why does it appear? What’s the problem?
how I perform this test?
– Danilo Silva
I made the changes and returned this error: NULL NULL PHP Error Message Warning: mysqli_stmt_bind_param() expects Parameter 1 to be mysqli_stmt, Boolean Given in /home/a9630388/public_html/Register.php on line 10 Free Web Hosting PHP Error Message Warning: mysqli_stmt_execute() expects Parameter 1 to be mysqli_stmt, Boolean Given in /home/a9630388/public_html/Register.php on line 11 Free Web Hosting {"Success":true}
– Danilo Silva
yes, I wrote them
– Danilo Silva
Let’s go continue this discussion in chat.
– Allan Andrade