01.
$row
= 5;
02.
$page
= 1;
03.
if
(isset(
$_GET
[
'page'
]) && (int)
$_GET
[
'page'
] > 0) {
04.
$page
= (int)
$_GET
[
'page'
];
05.
}
06.
07.
$p
=
$_GET
[
'p'
];
08.
$query
=
"SELECT * FROM customer "
;
09.
10.
11.
$result
= mysqli_query(
$con
,
$query
);
12.
$total_record
= mysqli_num_rows(
$result
);
13.
14.
$total_page
=
ceil
(
$total_record
/
$row
);
15.
if
(isset(
$_GET
[
'page'
])) {
16.
$page
=
$_GET
[
'page'
];
17.
}
else
{
18.
$page
= 1;
19.
}
20.
$start
= (
$page
- 1) *
$row
;
21.
$query
.=
" ORDER BY cus_id ASC limit {$start} , {$row} "
;
22.
$query3
= mysqli_query(
$con
,
$query
);
23.
$totalRows_prd
= mysqli_num_rows(
$query3
);