View Data In a Table (Php) Select Query

 <section class="pt-5 pb-5" style="background-color: lightblue;">
  <div class="container">
<table class="table table-bordered" align="center" id="example" >
    <thead>
     <th>Id</th>
     <th>Product Title</th>
     <th>Product Brand</th>
     <th>Product Price</th>
     <th>Product Image1</th>
     <th>Product Image2</th>
     <th>Product Description</th>
     <th>Product Delete</th>
     </thead>

    <?php
  $query="select * from trendingitem";
  $sel=mysqli_query($conn,$query);
  while($row=mysqli_fetch_array($sel))
  {
    $id=$row['trend_id'];
    $protitle=$row['producttitle'];
    $probrand=$row['productbrand'];
    $proprice=$row['productprice'];
    $img=$row['img'];
    $img2=$row['img2'];
    $prodesc=$row['adddesc'];
   ?>
    <tr>
      <td><?php echo $id; ?></td>
        <td><?php echo $protitle; ?></td>
        <td><?php echo $probrand; ?></td>
        <td><?php echo $proprice; ?></td>
        <td><img src="upload/<?php echo $img; ?>" width="100" height="100" /></td>
        <td><img src="upload/<?php echo $img2; ?>" width="100" height="100" /></td>
        <td><?php echo $prodesc; ?></td>
        <td><a href="deleteproduct.php?delid=<?php echo $id; ?>">Delete</a></td>
    </tr>
  <?php
  }     
  ?>
</table>   
</div>
</section>

Post a Comment

0 Comments