setAttribute(PDO::ATTR_ERRMODE,PDO::ERRMODE_EXCEPTION); if (isset($_POST['nome'])) { $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'])); $id=$conn->lastInsertId(); header("Location: http://localhost/~amato/local/mancolista/inserimento4-totale.php?id=$id"); } else { ?>
Inserimento avvenuto
Oggetto:
Descrizione:
Descrizione lunga:
Categoria: