0
I can’t figure out where the mistake is. I believe it’s on my face, but I can’t find it!
$inserir = $conexao->query("INSERT INTO cadastro (nome, sobrenome, email, senha, contrata, trabalha, status) VALUE (
$_POST['nome'],
$_POST['sobrenome'],
$_POST['email'],
$_POST['senha'],
$_POST['contrata'],
$_POST['trabalha'],
'N'
)");
Parse error: syntax error, Unexpected '' (T_ENCAPSED_AND_WHITESPACE), expecting '-' or Identifier (T_STRING) or variable (T_VARIABLE) or number (T_NUM_STRING) in
Put all POST values between keys.
– Woss
@Andersoncarloswoss I’ll do it, but why between keys? It wasn’t like that...
– Tiago
You are trying to inject a PHP expression into a string. In order for PHP to understand that it is an expression, you need to use the keys.
– Woss
https://answall.com/q/217819/5878
– Woss