food-inventory/list-cupboard.php

29 lines
580 B
PHP
Raw Normal View History

2019-11-10 15:55:06 +01:00
<?php
require_once("./assets/php/utils.php");
if (!is_connected()) {
header("location: login.php");
}
$cupboard_list = "";
foreach (get_users_cupboards_array() as $row) {
$cupboard_list = $cupboard_list . "<p>"
. htmlspecialchars($row["name"]) . "</p>\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">
<title>List cupboard</title>
</head>
<body>
<?php echo $cupboard_list; ?>
</body>
</html>