-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmenu.php
More file actions
62 lines (62 loc) · 2.54 KB
/
menu.php
File metadata and controls
62 lines (62 loc) · 2.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="css/style.css">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Comfortaa:wght@300..700&family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap" rel="stylesheet">
<title>Hangout Planner</title>
</head>
<body>
<header>
<nav>
<div class="nav_logo">
<h1><a href="index.php">Hangout Planner</a></h1>
</div>
</nav>
</header>
<main>
<div class="planner_part">
<table class="restaurant_table">
<thead>
<?php
if (isset($_SESSION['search_results'])) {
$results = $_SESSION['search_results'];
if (!empty($results)) {
if ($results[0]['type'] == 'menu') {
echo "<tr>
<th>Item</th>
<th>Cuisine</th>
<th>Serving Quantity</th>
<th>Price</th>
</tr>";
}
}
}
?>
</thead>
<tbody>
<?php
if (isset($_SESSION['search_results'])) {
$results = $_SESSION['search_results'];
foreach ($results as $result) {
if ($result['type'] == 'menu') {
echo "<tr>";
echo "<td>" . htmlspecialchars($result["ITEM_NAME"]) . "</td>";
echo "<td>" . htmlspecialchars($result["Cuisine"]) . "</td>";
echo "<td>" . htmlspecialchars($result["Quantity"]) . "</td>";
echo "<td>" . htmlspecialchars($result["Price"]) . "</td>";
echo "</tr>";
}
}
unset($_SESSION['search_results']);
}
?>
</tbody>
</table>
</div>
</main>
</body>
</html>