0
I can’t enter data into my table, and the commands are all right, right connection, but it doesn’t enter the data. I already redid the table to see if it was some configuration or name error, but it remains the same
Follows the code:
<?php
include 'conexao.php';
include 'script/password.php';
$nomeusuario = $_POST['nomeusuario'];
$mail = $_POST['mailusuario'];
$senha = $_POST['senhausuario'];
$nivel = $_POST['nivelusuario'];
$status = 'Ativo';
$sql = "INSERT INTO usuarios (nome_usuario,mail_usuario,senha_usuario,nivel_usuario,status) values ('$nomeusuario','$mail',sha1('$senha'),$nivel,'$status')";
$inserir = mysqli_query($conexao, $sql);
?>
What error appears on your screen?
– Gnomo Escalate
Make an echo $sql; and try to run the result in direct text in the database and send the error message for us to analyze.
– Heitor Scalabrini