This repository has been archived on 2022-10-26. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
biblio/editerLivre.php
2019-02-11 10:24:07 +01:00

19 lines
No EOL
648 B
PHP

<?php
require_once "includes/bdd.php";
// Requête SQL édition livre
$editerLivre = $bdd->prepare("UPDATE biblio_livre SET ISBN = :ISBN, titre = :titre, auteur = :auteur, genre = :genre, parution = :parution, mc = :mc, stock = :stock, editeur = :editeur, collection = :collection, nbPages = :nbPages WHERE ISBN = :ancienISBN");
// Tableau informations livre
$infosLivre = [];
// Stockage des infos dans tableau
foreach($_POST as $key => $value){
$infosLivre[$key] = $value;
}
// Exécution de la requête
$editerLivre->execute($infosLivre);
// Redirection vers page livre
header("Location: livre.php?ISBN=".$infosLivre['ISBN']);