Whenever I click the next page in pagination icon/button,its jumped to signout.
Please advice and help me to clear this.
- $showRecordPerPage = 5;
- if(isset($_GET['page']) && !emptyempty($_GET['page'])){
- $currentPage = $_GET['page'];
- }else{
- $currentPage = 1;
- }
- $startFrom = ($currentPage * $showRecordPerPage) - $showRecordPerPage;
- $totalEmpSQL = "SELECT * FROM feedback where id !='' and name!='' ";
- $allEmpResult = mysqli_query($link, $totalEmpSQL);
- $totalEmployee = mysqli_num_rows($allEmpResult);
- $lastPage = ceil($totalEmployee/$showRecordPerPage);
- $firstPage = 1;
- $nextPage = $currentPage + 1;
- $previousPage = $currentPage - 1;
- html code:
- ---------------
- >
- class
- if($currentPage != $firstPage) { ?>
- class
="page-item">- class="page-link" href="?page=" tabindex="-1" aria-label="Previous">
- "true">First
- if($currentPage >= 2) { ?>
- class
="page-item">class="page-link" href="feedbacklist.php?page=">echo $previousPage ?>- class
="page-item active">class="page-link" href="feedbacklist.php?page=">echo $currentPage ?>- if($currentPage != $lastPage) { ?>
- class
="page-item">class="page-link" href="feedbacklist.php?page=">echo $nextPage ?>- class
="page-item">- class="page-link" href="feedbacklist.php?page=" aria-label="Next">
- "true">Last
karthika pommuduPosted Apr 14, 2020, 11:30 PM
Vinay SinghPosted Mar 31, 2020, 3:28 AM