[Solved] How to add pagination in php
You need to first count the number of rows in your present query: $numrows = $s->rowCount(); and need to place a vaiable for results per page say $resultsPerPage: $resultsPerPage=10; Then the page you are currenty in: $offset=$_REQUEST[‘offset’]; Then you need to run the below code : $limit=$resultsPerPage; $PHP_SELF=$_SERVER[‘PHP_SELF’]; if($numrows >= 1) { // determine if … Read more