/* if(isset($_GET['page'])) {
$page = $_GET['page'];
} else {
$page = 1;
} */
if ( isset($_GET['page']) ) {
$current_page = $_GET['page'];
} else {
$current_page = 1;
}
$per_page = 20; // $num_per_page = 20;
$offset = $per_page * ($current_page - 1)
//$sql = "SELECT * FROM people ORDER BY id ASC LIMIT $start_from, $num_per_page";
$sql = 'SELECT * FROM people ORDER BY id ASC LIMIT ' . $per_page . ' OFFSET ' . $offset . ';
I think this will work, but I'm just taking an educated guess. You are going to need know the total number of records, so that you don't go pass the total records in your database table using your previous and next links.
HTH Helps?
Though I do have pagination working on my own website - https://www.phototechguru.com/