I want to display five record per page through pagination (mysql,php,html,css) until all the records are displayed, navigation to pages must be like,
IF your are using mysqli the code is below
$conn=mysqli_connect("localhost","root","","ui");
$start=0;
$limit=5;
$t=mysqli_query($conn,"select * from form_table");
$total=mysqli_num_rows($t);
if(isset($_GET['id']))
{
$id=$_GET['id'] ;
$start=($id-1)*$limit;
}
else
{
$id=1;
}
$page=ceil($total/$limit);
$query=mysqli_query($conn,"select * from form_table limit $start, $limit");
?>
Table
Id
Name
Gender
Hobbies
Course
= $ft['0']?>
= $ft['1']?>
= $ft['2']?>
= $ft['3']?>
= $ft['4']?>
1) {?> - Previous