-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlist_book.php
56 lines (37 loc) · 1.33 KB
/
list_book.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<?php include 'header.php';
include 'function.php';
?>
<h1>Les des livres</h1>
<br>
<?php
$livres=connect_list('book');
foreach($livres as $livre){
echo "{$livre['title']} : <a href=detail_livre.php?id={$livre['id']}>Detail</a>
- <a href=supprimer_livre.php?id={$livre['id']}>Supprimer un livre</a>
- <a href=modifier_livre.php?id={$livre['id']}>Modifier un livre</a>".BR;
}
?>
<?php include 'footer.php' ?>
<?php
// include('parts/_dbconnect.php');
// if (!empty($_POST["add_autor"])) {
// if (empty($_POST['firstname']) || empty($_POST['lastname']) || empty($_POST['sexe'])) {
// echo "Tous les champs sont obligatoires.";
// } else {
// $sql = "INSERT into `autor` (`firstname`, `lastname`, `sexe`, `date`)
// VALUES (:firstname, :lastname, :sexe, :birth)";
// $req = $pdo->prepare($sql);
// $req->bindParam(':firstname', $_POST['firstname'], PDO::PARAM_STR);
// $req->bindParam(':lastname', $_POST['lastname'], PDO::PARAM_STR);
// $req->bindParam(':sexe', $_POST['sexe'], PDO::PARAM_BOOL);
// $req->bindParam(':birth', $_POST['birth'], PDO::PARAM_STR);
// $res = $req->execute();
// if ($res) {
// echo "L'auteur a bien été ajouté";
// echo "<a href='/index.php'>Retour<a/>";
// } else {
// echo "Erreur lors de l'ajout";
// }
// }
// }
?>