Enter the php page number to jump to the specified page

Source: Internet
Author: User
For a good php Tutorial, we should not only deeply rooted in the hearts of the people, but also give readers a deep understanding of the source code, but we will never give it completely to prevent plagiarism. our brain has no knowledge of transcription, this is not worth the candle, in the attitude of being responsible for Everbright php fans

For a good php Tutorial, we should not only deeply rooted in the hearts of the people, but also give readers a deep understanding of the source code, but we will never give it completely to prevent plagiarism. our brain has no knowledge of transcription, this is not worth the candle. in the spirit of being responsible for Everbright php fans,

See the source code below, without comments. if there is no solution, you can query the php Manual.

Include_once 'Conn/conn. php ';
If ($ page = ""){
$ Page = 1;
}
If ($ lijl = ""){
$ Lijl = 0;
}
?>






















}
}

?>

If ($ page ){$ Page_size = 2;$ Query = "select count (*) as total from blog_insert where id ";$ Result = mysql_query ($ query );$ Massage_count = mysql_result ($ result, 0, "total ");$ Page_count = ceil ($ massage_count/$ page_size );$ Offset = ($ page-1) * $ page_size;$ Query = "select * from blog_insert where id order by id desc limit $ offset, $ page_size ";$ Result = mysql_query ($ query );While ($ myrow = @ mysql_fetch_array ($ result )){?>
Name No. Phone Number Address







Page Echo $ page;?> / Page record: Entries

Paging:
If ($ page = 1 ){
Echo "homepage ";
Echo "previous page ";
}
If ($ page <$ page_count ){
Echo "next page ";
Echo "last page ";
}
?>

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.