How do I pass additional parameter in the url for pagination to work
my existing page link is http://localhost/site/wp-admin/admin.php?page=myPage
How do I create the syntax / logic in PHP to add &pagenum=1
in the url?
currently I have this code
global $wpdb;
$per_page = 6;
$page_query = $wpdb->get_var("SELECT COUNT('id') FROM form");
$pages = ceil($page_query / $per_page);
$currentPage = (isset ($_GET['pagenum'])) ? (int)$_GET['pagenum'] : 1;
$start = ($currentPage -1 ) * $per_page;
$row = $wpdb->get_results("SELECT * FROM form LIMIT $start , $per_page");
//foreach loop here