Lokasi:
/
home
/
u109751622
/
domains
/
simtedu.in
/
public_html
/
sadmin
/
Ubah: cotactlist.php
<?php include "../config.php"; include "layout.php"; ?> <section class="content" style="min-height:500px"> <div class="row"><h3 class="text-center text-danger">Enquery Details </h3></div> <div class="row" > <div class="col-lg-1"> </div> <div class="col-lg-11"> <table class="table table-hover table-responsive table-bordered table-condensed"> <?php $per_page_record = 10; // Number of entries to show in a page. // Look for a GET variable page if not found default is 1. if (isset($_GET["page"])) { $page = $_GET["page"]; } else { $page = 1; } $start_from = ($page - 1) * $per_page_record; $query1 = "SELECT * FROM tblContact LIMIT $start_from, $per_page_record"; $rs_result1 = mysqli_query($conn, $query1); ?> <thead> <tr> <th>Id</th> <th>Name</th> <th>Mobile Number</th> <th>Email</th> <th>Subject</th> <th>Message</th> <th>Enquery Date</th> </tr> </thead> <tbody> <?php STATIC $ctr=0; while ($r = mysqli_fetch_array($rs_result1)) { ?> <tr> <td> <?php echo $r["Id"] ?> </td> <td> <?php echo $r["Name"]; ?> </td> <td> <?php echo $r["Mobile"] ?> </td> <td> <?php echo $r["Email"] ?> </td> <td> <?php echo $r['Subject'] ?> </td> <td> <?php echo $r['Message'] ?> </td> <td> <?php echo $r['ContactOn'] ?> </td> </tr> <?php $ctr++; } ?> </tbody> </table> </div> </div> <div class="row"> <div class="col-lg-3"></div> <?php $query = "SELECT COUNT(*) FROM tblContact"; $rs_result = mysqli_query($conn, $query); $row = mysqli_fetch_row($rs_result); $total_records = $row[0]; $total_pages = ceil($total_records / $per_page_record); ?> <div class="col-lg-6"> <nav aria-label="Page navigation example"> <ul class="pagination justify-content-center"> <li class="page-item disabled"> <?php if ($page >= 2) { ?> <a class="page-link" href="cotactlist.php?page=<?php echo($page - 1) ?>" tabindex="-1" aria-disabled="true">Previous</a> </li> <?php } for ($i = 1; $i <= $total_pages; $i++) { ?> <li class="page-item"><a class="page-link" href="cotactlist.php?page=<?php echo $i ?>"><?php echo $i ?></a></li> <?php }; ?> <?php if ($page < $total_pages) { ?> <li class="page-item"> <a class="page-link " href="cotactlist.php?page=<?php $page + 1 ?>"><span class="text-danger">Next</span></a> </li> <?php } ?> </ul> </nav> </div> <div class="col-lg-3"></div> </div> </section>
Batal