-
Notifications
You must be signed in to change notification settings - Fork 0
/
aff_velo.php
50 lines (40 loc) · 951 Bytes
/
aff_velo.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
<?php
session_start();
include ("util.php");
// get the information and affiche...
// confirm or not
ecritEntete();
ecritHeaderMenu();
/*Add velo*/
// connect to database
$conn = connectionbase();
//affichage de la liste des vélos dans une table
?>
<table>
<tr>
<th>Nom</th>
<th>Description</th>
<th>Date D'achat</th>
<th>Date De vente</th>
</tr>
<?php
// on itere sur la table
$conn->real_query("SELECT name,description, datein, dateout from velo ORDER BY datein ASC");
$res = $conn->use_result();
while ($row = $res->fetch_assoc()) {
echo "<tr>";
$name=$row['name'];
$description=$row['description'];
$datein=$row['datein'];
$dateout=$row['dateout'];
echo "<td>$name</td>
<td>$description</td>
<td>$datein</td>
<td>$dateout</td>";
echo "</tr>";
}
echo "</table>";
$res->close();
$conn->close();
ecritFin();
?>