0
i (beginner in the field of php development) am having problems inserting data using the code below:
<?php
$conn = new mysqli("zz", "zz", "zz", "zz");
// Alterei a string de conexão por questão de segurança
if ($conn->connect_error) {
echo "Error: " .$conn->connect_error;
}
$login = 'user';
$senha = '12345';
$stmt = $conn->prepare("INSERT INTO tbl_usuario (login,senha) VALUES (?, ?)");
$stmt->execute();
?>
It runs normally without error, but when I check my database, no data was actually included :/. Someone could help me?
Have examples in: Mysqli bind with an array of values and How to convert a Mysql connection to Mysqli?
– rray