-
Notifications
You must be signed in to change notification settings - Fork 0
/
dish.php
36 lines (25 loc) · 834 Bytes
/
dish.php
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
<?php
define("TITLE", "Details of dish" );
include('includes/header.php');
function strip_bad_chars($input){
$output = preg_replace("/[^a-zA-Z0-9-]/","", $input);
return $output;
}
if(isset($_GET['item'])){
$menuItem = strip_bad_chars( $_GET['item'] );
$dish = $dishItems[$menuItem];
}
?>
<hr>
<div id="dish">
<h1><?php echo $dish["name"]; ?> <span class="price"><sup>$</sup><?php echo $dish["price"]; ?></span></h1>
<p><?php echo $dish["desc"] ?></p>
<hr>
<strong><p>Suggested Beverage: <?php echo $dish["drink"] ?></p></strong>
<p>Suggested Tip: <sup>$</sup>2.20</p>
<hr>
</div> <!--dish-->
<a href="menu.php" class="button previous">« Back to Menu</a>
<?php
include('includes/footer.php');
?>