1
if ($validacao) {
$pdo = Banco::conectar();
$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$sql = "INSERT INTO perguntas (p1, p2, p3, p4, p5, p6, p7, p8, p9, p10) VALUES (?,?,?,?,?,?,?,?,?,?)";
$q = $pdo->prepare($sql);
$q->execute(array($p1, $p2, $p3, $p4, $p5, $p6, $p7, $p8, $p9, $p10));
Banco::desconectar();
header("Location: index.php");
}
review your code, see where they close and open php tags, something must be escaping
– Ricardo Pontual
I’ve checked it several times, but I can’t identify it. I’m new to the language
– gustavo
that your code snippet is too small... your error may be in another snippet or file
– Marcos Vinicius
this is the only part of the code that appears in the browser. I believe the rest is right
– gustavo
Can reveal your complete code? So I can get an idea of what to do to help you (because I hardly know PHP).
– user189693