l107/djkjd.php
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
.container-tabel{
display: grid;
width: 400px;
grid-template-columns: 1fr 1fr auto 1fr;
}
div{
/* width: px; */
border: solid 0.5px black;
padding: 5px;
}
</style>
</head>
<body>
<?php
include('db_eigen.php');
$query ="select *
from films
order by film_id";
//resultaat opslaan in variabele
$result = mysqli_query($db, $query) or die(mysqli_error($db));
//ophalen uit het resultaat
$row = mysqli_fetch_array($result);
echo "<h2>$row[titel]</h2>";
echo "<h3>Informatie over deze film</h3>";
?>
<div class="container-tabel">
<div>Genre</div>
<div>Speeltijd</div>
<div>Leeftijdscategorie</div>
<div>Releasedatum</div>
<?php
echo "<div>$row[genre]</div>";
echo "<div>$row[speeltijd]</div>";
echo "<div>$row[leef_categorie]</div>";
echo "<div>$row[rel_datum]</div>";
?>
</div>
</body>
</html>
Resultaat
Made by Thijs Aarnoudse