✏️ 正在编辑: pagination.php
路径:
/home/llpreacharge/public_html/Admin/pagination.php
提示:
您可以编辑任何文件(包括二进制文件),但请注意不当修改可能导致文件损坏。
<html> <head> <title>Pagination</title> </head> <body> <?php include'connection.php'; include'time.php'; $results_per_page=10; $quGetTxn="select * from recharge where Rechargedate='$date'"; $reGetTxn=mysqli_query($con,$quGetTxn); $number_of_txn=mysqli_num_rows($reGetTxn); $number_of_page=ceil($number_of_txn/$results_per_page); // start copy from online page// //determine which page number visitor is currently on if (!isset ($_GET['page']) ) { $page = 1; } else { $page = $_GET['page']; } //determine the sql LIMIT starting number for the results on the displaying page $page_first_result = ($page-1) * $results_per_page; // end copy from online page// $query = "SELECT *FROM recharge where Rechargedate='$date' LIMIT " . $page_first_result . ',' . $results_per_page; //$query="select * from recharge limit".$page_first_result.','.$results_per_page; $result=mysqli_query($con,$query); while($row=mysqli_fetch_array($result)) { echo $row['Id'].' '.$row['Amount'].'</br>'; } //display the link of the pages in URL for($page = 1; $page<= $number_of_page; $page++) { echo '<a href = "pagination.php?page=' . $page . '">' . $page . ' </a>'; } ?> </body> </html>
💾 保存文件
← 返回文件管理器