better styling so it's clearer

This commit is contained in:
Louis Vallat 2019-11-11 14:42:07 +01:00
parent 8f2965c051
commit 52e3f7cc66

View File

@ -8,21 +8,48 @@ if (!is_connected()) {
$cupboard_list = "";
foreach (get_users_cupboards_array() as $row) {
$cupboard_list = $cupboard_list . "<p>"
. htmlspecialchars($row["name"]) . "</p>\n";
$cupboard_list = $cupboard_list . "<tr><td>"
. htmlspecialchars($row["name"])
. "</td><td>"
. htmlspecialchars($row["description"])
. "</td></tr>\n";
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<style type="text/css">
table,
th,
td {
border: 1px solid #333;
}
</style>
<title>List cupboard</title>
</head>
<body>
<?php echo $cupboard_list; ?>
<table>
<thead>
<tr>
<th>
Nom
</th>
<th>
Description
</th>
</tr>
</thead>
<tbody>
<?php echo $cupboard_list; ?>
</tbody>
</table>
</body>
</html>