-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSearchCourse.php
More file actions
51 lines (45 loc) · 1.17 KB
/
Copy pathSearchCourse.php
File metadata and controls
51 lines (45 loc) · 1.17 KB
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
<?php
include '../../Controller/CourseC.php';
$courseC = new CourseC();
if (isset($_GET['label']) && !empty($_GET['label'])) {
$list = $courseC->showCourse($_GET['label']);
} else {
$list = $courseC->listCourses();
}
?>
<html>
<head></head>
<body>
<div>
<form action="" method="GET">
<input type="text" name="label" id="label" placeholder="Enter Course name">
<input type="submit" value="Search">
</form>
</div>
<center>
<h1>List of courses</h1>
</center>
<table border="1" align="center" width="70%">
<tr>
<th>Id Course</th>
<th>Label</th>
<th>Duration</th>
<th>Number of places</th>
<th>Date Course</th>
</tr>
<?php
foreach ($list as $course) {
?>
<tr>
<td><?= $course['idCourse']; ?></td>
<td><?= $course['label']; ?></td>
<td><?= $course['duration']; ?></td>
<td><?= $course['nbPlaces']; ?></td>
<td><?= $course['dateCourse']; ?></td>
</tr>
<?php
}
?>
</table>
</body>
</html>