I have a site that lists the best books by popular vote. The books are stored in a database. Is there a way to set the $maxresults to the width of the monitor? On larger monitors, this leaves one or two books in the entire bottom row. I'd like each row to be filled in regardless of the resolution. Maybe an if statement? My code:
$maxresults = 21;
if($_GET['page'])
$page = $_GET['page'];
else
$page = 0;
$currentpage = $page;
$page = $page*$maxresults;
$numpages = QuickQuery("SELECT COUNT(id) FROM movies WHERE visible=1");
$numpages = mysql_result($numpages, 0);
$numpages = $numpages/$maxresults-1;
$result = GetBooksByRangeID($page, $maxresults);//Show <maxresults> pages at a time
DisplayResults($result);
?>