aboutsummaryrefslogtreecommitdiff
path: root/public/index.php
diff options
context:
space:
mode:
Diffstat (limited to 'public/index.php')
-rw-r--r--public/index.php10
1 files changed, 7 insertions, 3 deletions
diff --git a/public/index.php b/public/index.php
index 0f268cb..653962c 100644
--- a/public/index.php
+++ b/public/index.php
@@ -1,4 +1,5 @@
<!DOCTYPE html>
+<?php require "db.php"; ?>
<html>
<head>
<?php include 'head.php' ?>
@@ -11,9 +12,12 @@
<div class="s1">
<h1>hier zijn de aanbiedingen</h1>
<ul>
- <li>Lorem ipsum dolor sit amet consectetur adipisicing elit. Fuga iure id repudiandae sapiente voluptatibus soluta ducimus? Molestiae pariatur optio saepe nihil fugit, commodi atque! Consequatur at omnis recusandae nostrum tenetur!</li>
- <li>Ut, repudiandae? Iusto pariatur cupiditate, ipsam magni accusamus asperiores possimus nulla, magnam quas consectetur fugit vero quibusdam officiis quod, vitae soluta nostrum placeat itaque sit beatae quos laudantium? Temporibus, magni.</li>
- <li>Ipsum fugiat corporis impedit iusto possimus neque alias at sunt commodi deserunt! Numquam perferendis rem ea provident velit dicta quae. Eveniet officia iure porro aliquid minus alias at commodi nam?</li>
+ <?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>