Again cheeky... Paging... The page is still the current page after the jump

Source: Internet
Author: User
Again cheeky ............ Paging ............ After the page jumps to the current page, the current page & nbsp; & lt ;? Php & nbsp; extract ($ _ REQUEST); & nbsp; $ pages = ceil ($ count/again cheeky ............ Paging ............ After the page jumps to the current page
 
 Extract ($ _ REQUEST );
$ Pages = ceil ($ count/$ list_num );
Echo"
 
 
There are currently a total of ". $ count." records
Total ". $ pages." pages";
 
If ($ offset ){
$ Preoffset = $ offset-$ list_num;
Print" Previous Page";}
Else {
Echo" Previous Page";
}
$ Newoffset = $ offset + $ list_num;
If ($ pages! = 0) & ($ newoffset/$ list_num )! = $ Pages ))
{
Print (" Next page");
}
Else {echo" Next page";}
$ Pageno = ($ offset/$ list_num) + 1;
Echo" The
Page

";
?>
Share:
------ Solution --------------------
You can adjust the extract ($ _ REQUEST) of 61 rows to 32 rows, or even put it in header. php or conn. php.
Otherwise, because $ offset is not assigned a value, if (empty ($ offset) is invariably set.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.