aboutsummaryrefslogtreecommitdiff
path: root/public/index.php
blob: 653962c6530fe89741bd745c89767a2b1b95bb77 (plain)
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
<!DOCTYPE html>
<?php require "db.php"; ?>
<html>
<head>
	<?php include 'head.php' ?>
	<title>webshop</title>
	<link rel='stylesheet' type='text/css' media='screen' href='home.css'>
</head>
<body>
	<?php include 'navbar.php' ?>
	<div class="main limwidth">
		<div class="s1">
			<h1>hier zijn de aanbiedingen</h1>
			<ul>
				<?php
					$res = $cursor->query("select product.ID as id, product.name as name from promotion join product on product.ID = promotion.product");
					while ($product = $res->fetch_object()) {
						echo "<li><a href=\"/product.php?id=$product->id\">$product->name</a></li>";
					}
				?>
			</ul>
		</div>
	</div>
	<?php include 'footer.php' ?>
</body>
</html>