Untitled

mail@pastecode.io avatar
unknown
plain_text
7 months ago
2.3 kB
3
Indexable
Never
<?php
include 'db.php';

$sql = "SELECT * FROM products";
$result = $conn->query($sql);
?>

<!DOCTYPE html>
<html lang="tr" >
<head>
  <meta charset="UTF-8">
  <title>Aksaray Ticaret Borsası Güncel Fiyatlar</title>
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.min.css">
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="./style.css">

</head>

<!-- partial:index.partial.html -->
<div class="Marquee">
  <div class="Marquee-content">
  <div class="Marquee-tag"><i class="fa fa-clock-o"></i> Son Güncelleme 19 Aralık 2023 - 18:45</div>
    <div class="Marquee-tag">Arpa (Buğdaylık) En Düşük: <i class="fa fa-caret-down"></i>  2.432 ₺ - En Yüksek: 2.695 ₺</div>
    <div class="Marquee-tag">Buğday (Makarnalık) En Düşük: <i class="fa fa-caret-down"></i>  1.544 ₺ -  En Yüksek: <i class="fa fa-caret-up"></i> 1.695 ₺</div>
        <div class="Marquee-tag">Çavdar (Yemlik) En Düşük:<i class="fa fa-caret-down"></i>  6.332 ₺ -  En Yüksek: <i class="fa fa-caret-up"></i> 6.999 ₺</div>
    <div class="Marquee-tag">Buğday (Makarnalık)  En Düşük:<i class="fa fa-caret-down"></i> 1.544 ₺ -  En Yüksek: <i class="fa fa-caret-up"></i> 1.695 ₺</div>
    <div class="Marquee-tag">Çavdar (Yemlik)  En Düşük:<i class="fa fa-caret-down"></i> 6.332 ₺ - En Yüksek: <i class="fa fa-caret-up"></i>  6.999 ₺</div>
  </div>
</div>
<!-- partial -->



    <h2>Ürün Listesi</h2>
    <table border="1">
        <tr>
            <th>ID</th>
            <th>Ürün Adı</th>
            <th>En Düşük Fiyat</th>
            <th>En Yüksek Fiyat</th>
        </tr>
        <?php
        if ($result->num_rows > 0) {
            while($row = $result->fetch_assoc()) {
                echo "<tr>";
                echo "<td>".$row["id"]."</td>";
                echo "<td>".$row["product_name"]."</td>";
                echo "<td>".$row["min_price"]."</td>";
                echo "<td>".$row["max_price"]."</td>";
                echo "</tr>";
            }
        } else {
            echo "<tr><td colspan='4'>Ürün bulunamadı</td></tr>";
        }
        ?>
    </table>
</body>
</html>

Leave a Comment