You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
962 B
PHP

<?php
session_start();
require_once("model/db.php");
require_once("controller/getRecord.php");
require_once("controller/listLatest.php");
require_once("view/mainContent/userButtons.php");
if(isset($_SESSION["loggedin"]) && $_SESSION["loggedin"] === true){
require("view/header.php");
require("view/sidebar.php");
echo "<div class=\"content\">";
$arrayOfBeers = listBeersByUser($pdo, $_SESSION["id"]);
foreach($arrayOfBeers as $row):
echo "
<div class=\"box\">
<article>
<a href=\"beer.php?id=";
echo $row["id"];
echo "\"><h2>";
echo $row["name"];
echo " ";
echo $row["degree"];
echo "˚</h2></a>";
showStars($row["id"], $row["rating"]);
echo "</br>";
echo "</br>";
echo "</article>
</div>";
endforeach;
echo "</div>";
include("view/footer.php");
} else {
header("location: index.php");
}