<?php 
include 'header.php';
?>

<!-- Card start -->
     <div class="card">
                  <div class="card-header">
                    <div class="card-title"></div>
                  </div>
                  <div class="card-body">
                    <div class="table-responsive">
                      <table id="scrollVertical" class="table custom-table">
                        <thead>
                          <tr>
                            <th>#</th>
                            <th>Department</th>
                            <th>Subject</th>
                            <th>Message</th>
                            <th>Status</th>
                            <th>Date</th>
                            <th>Action</th>
                          </tr>
                        </thead>
                        <tbody>
                        <?php
                        $i = 0;
                          $select = mysqli_query($link, "SELECT * FROM  support   ");
                          if (mysqli_num_rows($select) > 0) {
                          while ($row = mysqli_fetch_assoc($select)) {
                          $id = $row ['id'];
                        $i++         
                        ?>  
                          <tr>
                            <td><?php echo $i  ?></td>
                            <td><?php echo $row['department']  ?></td>
                            <td><?php echo $row['subject']  ?></td>
                            <td><?php echo $row['message']  ?></td>
                            <td><?php echo $row['status']  ?></td>
                            <td><?php echo $row['date']?></td>
                        
                            <td>
                               <a class="btn btn-sm btn-success" style="color: white;" href="editsupport.php?support=<?php echo $id  ?>">Edit</a>
                            </td>

                            <td>
                               <a class="btn btn-sm btn-primary" style="color: white;" href="viewsupport.php?support=<?php echo $id  ?>">View</a>
                            </td>

                           <!-- <td>
                               <a class="btn btn-sm btn-danger" style="color: white;" href="all-menu.php?delete=<?php echo $id  ?>">Delete</a>
                          </td> -->
                        </tr>
                    
                      <?php }} ?>
                      </tbody>
                  </table>
              </div>
          </div>
      </div>
  </div>
<?php
    include 'footer.php';
?>