TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
karthika pommudu
NA
321
35k
Pagination signout when click next page
Mar 30 2020 4:41 AM
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'
]) && !
empty
empty
(
$_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:
---------------
<nav aria-label=
"Page navigation"
>
<ul
class
=
"pagination"
>
<?php
if
(
$currentPage
!=
$firstPage
) { ?>
<li
class
=
"page-item"
>
<a
class
=
"page-link"
href=
"?page=<?php echo $firstPage ?>"
tabindex=
"-1"
aria-label=
"Previous"
>
<span aria-hidden=
"true"
>First</span>
</a>
</li>
<?php } ?>
<?php
if
(
$currentPage
>= 2) { ?>
<li
class
=
"page-item"
><a
class
=
"page-link"
href=
"feedbacklist.php?page=<?php echo $previousPage ?>"
><?php
echo
$previousPage
?></a></li>
<?php } ?>
<li
class
=
"page-item active"
><a
class
=
"page-link"
href=
"feedbacklist.php?page=<?php echo $currentPage ?>"
><?php
echo
$currentPage
?></a></li>
<?php
if
(
$currentPage
!=
$lastPage
) { ?>
<li
class
=
"page-item"
><a
class
=
"page-link"
href=
"feedbacklist.php?page=<?php echo $nextPage ?>"
><?php
echo
$nextPage
?></a></li>
<li
class
=
"page-item"
>
<a
class
=
"page-link"
href=
"feedbacklist.php?page=<?php echo $lastPage ?>"
aria-label=
"Next"
>
<span aria-hidden=
"true"
>Last</span>
</a>
</li>
<?php } ?>
</ul>
</nav>
Reply
Answers (
2
)
When run laravel project it display sqllite required error?
When seed data to database error display?