-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplaylists.php
50 lines (49 loc) · 1.5 KB
/
playlists.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
require("php/database.php");
session_start();
$sql = "SELECT id, name, subtext, headimage FROM cat;";
$result = $conn->query($sql);
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<?php
require("components/style.php");
?>
<title><?php echo $open; ?> - Playlist Lijst</title>
</head>
<body>
<?php require("components/navbar.php"); ?>
<main id="article">
<div class="container">
<h1 class="fw-bold text-center mb-5">Bekijk hieronder andere programmeertalen:</h1>
<div class="row mb-5">
<?php
foreach ($result as $item) {
$image = $item['headimage'];
echo "
<div class='colum col-sm-12 col-md-6 col-lg-4'>
<article class='card' style='background-image: url(";
echo $image;
echo "); '>
<div class='card-body'>
<h2>".$item['name']."</h2>
<p>".$item['subtext']."</p>
<p class='read'><a class='stretched-link' href='playlist.php?id=".$item['id']."'>Lees verder...</a></p>
</div>
</article>
</div>";
}
?>
</div>
</div>
</main>
<?php
require("components/footer.php");
require("components/scripts.php");
?>
</body>
</html>