This commit is contained in:
EmmanuelTiamzon
2025-09-30 09:43:41 +02:00
parent f7de13bc2a
commit 7019a3b7ea
176 changed files with 9458 additions and 149 deletions

View File

@@ -0,0 +1,63 @@
<?php
include './include/data.inc.php';
?>
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>tp1 - ex3</title>
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/@picocss/pico@2/css/pico.classless.min.css"
>
<link rel="stylesheet" href="./css/style.css">
</head>
<body>
<main>
<h2>Exercice 3 : IMC </h2>
<table>
<thead>
<tr>
<th>Nom</th>
<th>Prénom</th>
<th>Email</th>
<th>Taille</th>
<th>Poids</th>
<th>IMC</th>
</tr>
</thead>
<tbody>
<?php
foreach($data as $person){
echo"<table>";
echo"<tr>";
echo"<th>";
$imc = round($person['Poids']/($person['Taille'] * $person[$taille])*10000,2);
foreach($person as $value) {
echo "<td>$value</td>";
echo "<td>$imc</td>";
}
$warning = "";
if ($imc >= 25) {
$warning = 'warning';
echo "<tr class='$warning'>";
echo "</tr>";
}
foreach($person as $value)
echo "<td>$value</td>"
echo "<td>$imc</td></tr>";
echo"</th>";
echo"</tr>";
echo"</table>";
}
?>
</tbody>
</table>
</main>
</body>
</html>