". $res_n." RESULTS FOUND
"; $i=1; if($res_n==0) echo "

    ----- No Results Found --------
"; else { echo ''; while($recs=mysql_fetch_array($res)) { if($i==4) { echo ''; $i=1; } ?>
" rel="lightbox" title=""> " width="70" height="100" border="0" />
'; } ?>

$title

$author

$story

"; } }else{ //view all the news articles in rows $sql = mysql_query("SELECT * FROM news LIMIT ".$limits.",$max") or die(mysql_error()); //the total rows in the table $totalres = mysql_result(mysql_query("SELECT COUNT(id) AS tot FROM news"),0); //the total number of pages (calculated result), math stuff... $totalpages = ceil($totalres / $max); //the table echo ""; while($r = mysql_fetch_array($sql)) { $id = $r['id']; $title = $r['title']; $author = $r['author']; echo ""; } //close up the table echo "
TitleAuthor
$title$author
"; for($i = 1; $i <= $totalpages; $i++){ //this is the pagination link echo "$i|"; } }*/ ?>