how to create a pagination in php problem
i get this error when i open the index.php
Notice: Use of undefined constant num - assumed 'num' in pagination.php on line 12 Notice: Undefined index: page in pagination.php on line 14 what do i do to solve this problem?
1 Answer
ok, just try to replace with this
$query = \"SELECT COUNT(*) as num FROM $tbl_name\"; $row = mysql_fetch_array(mysql_query($query)); $total_pages = $row[\'num\'];and replace $page = $_GET[\'page\'];with $page = (int) (!isset($_GET[\"page\"]) ? 1 : $_GET[\"page\"]); $page = ($page == 0 ? 1 : $page); Posted: MacOS 1 of 1 people found this answer helpful. Did you? Yes No tnx one error solved but error in line 14 not solved still i get this Notice: Undefined index: page pagination.php on line 14 try part 2 of the code please thank u very very much to share your knowledge to others thanks, any peoblem just let me see it :) |
© Advanced Web Core. All rights reserved
please provide your code or just an example with the error line
September 21, 2011
i mean your code, your own pagination query not the function
September 21, 2011
this is your tutorial, i get those error from your tutorial i wrote the link for u
September 21, 2011
please, i mean how do you use it please let me see your code not the pagination function
September 21, 2011
i told u every thing may this help i made database tutorials and insert all SQL text on it 4.open the index.php from local host 5.everything are good except i get this error this is what you mean?
September 21, 2011
plz help me i need to fix that
September 21, 2011