pimchanok leuwisetpaibul php simple paging program page 1/5

WBOY
Release: 2016-07-29 08:37:45
Original
1175 people have browsed it

[code]



User Information Summary




########### ################################################
########### Connecting to the database ################
################### #######################################
$db=mysql_connect("192.168 .0.2","root","goalwe608"); //Database, username, password
mysql_select_db("86pos",$db); //Database
############# Pagination ############
//Set the number of records displayed on each page
$pagesize=5;
//Get the total number of records
$res=mysql_query("select count(id) from buyer " ,$db);
$myrow = mysql_fetch_array($res);
$numrows=$myrow[0];
//Calculate the total number of pages
$pages=intval($numrows/$pagesize);
if ($ numrows%$pagesize)
$pages++;
//Determine whether the page number is set or not, if not, define it as the homepage
if (!isset($page))
$page=1;
//Prevent malicious access
if ( $_GET

Current page 1/5 12345Next page

The above introduces pimchanok leuwisetpaibul php simple paging program page 1/5, including the content of pimchanok leuwisetpaibul. I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template