im making a jokes website and one of the pages is jokes.pho?cat=4 which will display all jokes with the category set as 4. the code so far is:
PHP Code:
<?php
require_once("mysql_connect.php");
$query = "SELECT * FROM jokes WHERE cat=$cat ORDER BY id DESC";
$result = mysql_query($query);
## CODE THAT DISPLAYS THE RESULTS IN A TABLE ##
?>
what im trying to make is a system that counts how many jokes in that category, and displays links that will be like:
view: 1-20, 21-40, 41-60
but it will need to auto figure out how many links it will need to produce and link them to a page like:
jokes.php?cat=4&selection=1,20
please help!