I really don't know how to explain this question. But, I'm trying to make a product page that shows the same row as it is currently showing (so example "go onto a tech product page and at the bottom it shows all other tech related products").
Here is what I've tried:
<?php
$pType = $row['typeP'];
$sql = "SELECT * FROM products WHERE type=$pType";
$result = mysqli_query($con, $sql) or die(mysqli_error($con));
while ($row = mysqli_fetch_array($result)){
echo "<a href='products.php?id={$row['productID']}'>";
echo "<img src='uploads/{$row['displayIMG']}'>";
echo "</a>";
}
?>
0 comments:
Post a Comment