-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdetails_module.php
More file actions
43 lines (31 loc) · 980 Bytes
/
Copy pathdetails_module.php
File metadata and controls
43 lines (31 loc) · 980 Bytes
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
<?php
require_once('config/db_connect.php');
include("templates/header.php");
include("templates/main_nav.php");
$id = mysqli_real_escape_string($conn, $_GET['id']);
// enregistrer la requete dans une variable
$sql = "SELECT * FROM modules WHERE id = '$id'";
// executer la requetes
$result = mysqli_query($conn, $sql);
// Transformer en un tableau associative
$module = mysqli_fetch_assoc($result);
// Liberer les resultats
mysqli_free_result($result);
// fermer la connexion
mysqli_close($conn);
?>
<div class="container center">
<h2>Details</h2>
<?php if ($module): ?>
<h4>
<?php
echo htmlspecialchars($module['titre']);
?>
</h4>
<h6>Code: <?php echo htmlspecialchars($module['code']); ?></h6>
<p> <?php echo htmlspecialchars($module['_description']); ?></p>
<?php else: ?>
<p>no data</p>
<?php endif; ?>
</div>
<?php include("templates/footer.php") ?>