hi, here is the script im using http://www.goodphptutorials.com/out/Simple_PHP_MySQL_Pagination
this is the code i put on the page (excluding all other code)
//pagination
$page = 1;
// how many records per page
$size = 10;
// we get the current page from $_GET
if (isset($_GET['page'])){
$page = (int) $_GET['page'];
}
// create the pagination class
$pagination = new Pagination();
$pagination->setLink("listing.php?page=%s");
$pagination->setPage($page);
$pagination->setSize($size);
$pagination->setTotalRecords($total_records);
my query looks like this
$query = mysql_query("select * from tbl_listing ".$pagination->getLimitSql()) or die(mysql_error());
the error im getting is this
Notice: Undefined variable: total_records in D:\wamp\www\lolallday\admin\listing.php on line 25
line 25 is this: $pagination->setTotalRecords($total_records);
and the pagination links dont show. anyone know what can be the problem? i cant figure it out.
thanks