Could someone point me to a simple pagination tutorial, simple in being not a huge long code at the end. I just need a Previous/Next type of pagination .. or if someone could write one for me that would be great.
Okay, I tried that but I'm having troubles with this part: $query = "SELECT count(*) FROM table WHERE ..."; $result = mysql_query($query, $db) or trigger_error("SQL", E_USER_ERROR); $query_data = mysql_fetch_row($result); $numrows = $query_data[0]; I replaced table with my table name, but it doesn't seem to wanna work.. EDIT: I removed WHERE ... and it seems to be working..
I was getting mysql errors, but then I realised it was the query. Can anyone help me with getting it to show just Next/Previous when needed. I've got it down to: if ($pageno !== 1) { $prevpage = $pageno-1; echo " <a href='{$_SERVER['PHP_SELF']}?pageno=$prevpage'>PREV</a> "; } // if if ($pageno == $lastpage) { echo " NEXT LAST "; } else { $nextpage = $pageno+1; echo " <a href='{$_SERVER['PHP_SELF']}?pageno=$nextpage'>NEXT</a> "; } // if PHP: