-
Notifications
You must be signed in to change notification settings - Fork 0
/
element.php
75 lines (66 loc) · 3.75 KB
/
element.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<?php
require_once('./assets/php/db.php');
$search = htmlspecialchars($_GET['search']);
$query = $conn->prepare("SELECT * FROM `arbres` WHERE vernaculaire = :search;");
$query->execute([':search' => $search]);
$result = $query->fetchAll(PDO::FETCH_ASSOC);
$title = $result[0]['vernaculaire'];
require_once 'includes/header.php';
?>
<main class="main h-100 mb-5">
<section class="row">
<div class="col-md-6 mx-auto">
<div class="card mx-auto" style="max-width: 50rem;">
<div class="d-flex justify-content-between card-header">
<h3 class="card-title text-center text-info"><?= $result[0]['vernaculaire'] ?></h3>
<h3 class="card-text text-center text-info mb-3"><?= $result[0]['latin'] ?></h3>
</div>
<div class="card-body bg-herb">
<table>
<tbody>
<tr>
<th scope="row" class="col-3 pb-2"><i class="fas fa-tree"></i>Famille</th>
<td class="text-light col-9 pb-2"><?= $result[0]['famille'] ?></td>
</tr>
<tr>
<th scope="row" class="col-3 pb-2"><i class="fas fa-globe"></i>Origine</td>
<td class="text-light col-9 pb-2"><?= $result[0]['origine'] ?></td>
</tr>
<tr>
<th scope="row" class="col-3 pb-2"><i class="fas fa-arrow-up"></i>Hauteur</td>
<td class="text-light col-9 pb-2"><?= $result[0]['hauteur'] ?> mètres</td>
</tr>
<tr>
<th scope="row" class="col-3 pb-2"><i class="fas fa-infinity"></i>Longévité</td>
<td class="text-white col-9 pb-2"><?= $result[0]['longevite'] ?> ans</td>
</tr>
<tr>
<th scope="row" class="col-3 pb-2"><i class="fas fa-leaf"></i>Feuilles</td>
<td class="text-white col-9 pb-2"><?= $result[0]['feuille'] ?></td>
</tr>
<tr>
<th scope="row" class="col-3 pb-2"><i class="fas fa-layer-group"></i>Sol</td>
<td class="text-white col-9 pb-2"><?= $result[0]['sol'] ?></td>
</tr>
<tr>
<th scope="row" class="col-3 pb-2"><i class="fa fa-lemon"></i>Fruit</td>
<td class="text-white col-9 pb-2"><?= $result[0]['fruit'] ?></td>
</tr>
<tr>
<th scope="row" class="col-3 pb-2"><i class="fa fa-scissors"></i>Taille</td>
<td class="text-white col-9 pb-2"><?= $result[0]['taille'] ?></td>
</tr>
<tr>
<th scope="row" class="col-3 pb-2"><i class="fas fa-info"></i>Infos</td>
<td class="text-white col-9 pb-2"><?= $result[0]['info'] ?></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>
</main>
<?php require_once 'includes/footer.php'; ?>
</body>
</html>