aboutsummaryrefslogtreecommitdiff
path: root/public/products.php
diff options
context:
space:
mode:
authorlonkaars <loek@pipeframe.xyz>2023-05-08 17:14:06 +0200
committerlonkaars <loek@pipeframe.xyz>2023-05-08 17:14:06 +0200
commitf3b582307cc3caf5ee0c7514d461e47fb5893bc7 (patch)
tree8865da67af7ae04d870481af155781c9a82ff0a7 /public/products.php
parentcda96d31939c7ea727c114b162f43bb4d18314a2 (diff)
uppercase is dumb
Diffstat (limited to 'public/products.php')
-rw-r--r--public/products.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/public/products.php b/public/products.php
index bffaeb0..fd3e2a1 100644
--- a/public/products.php
+++ b/public/products.php
@@ -2,7 +2,7 @@
<?php require "db.php"; ?>
<?php
function product_template($product) {
- $image_path = $product->img ? "/img/product/$product->id-thumb.jpg" : "/img/placeholder.png";
+ $image_path = $product->image ? "/img/product/$product->id-thumb.jpg" : "/img/placeholder.png";
echo <<<"EOF"
<a href="/product.php?id=$product->id" class="product nolinkstyle">
<img src="$image_path" alt="">
@@ -24,7 +24,7 @@ EOF;
<h2>lijst met producten:</h2>
<div class="products">
<?php
- $res = $cursor->query("select ID as id, image as img, price, name from webs.product");
+ $res = $cursor->query("select id, image, price, name from webs.product");
while ($product = $res->fetch_object()) product_template($product);
?>
</div>