########### ################################################
########### 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.

Statement:
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
Previous article:The local connection is restricted or cannot be connected. Use php to get the remote image and save it to the local code.Next article:The local connection is restricted or cannot be connected. Use php to get the remote image and save it to the local code.

Related articles

See more