setAttribute(PDO::ATTR_ERRMODE,PDO::ERRMODE_EXCEPTION); $stmt=$conn->prepare("INSERT INTO oggetti (nome,descrizione,descrizione_lunga,categoria_id) VALUES (?,?,?,?)"); $stmt->execute(array($_POST['nome'],$_POST['descrizione'],$_POST['descrizione_lunga'],$_POST['categoria_id'])); header("Location: http://localhost/~amato/inserimento3-conferma.php"); ?>