require "admin/config.php"; // All database details will be included here $page_name="index.php"; // If you use this code with a different page ( or file ) name then change this $start=$_GET['start']; if(strlen($start) > 0 and !is_numeric($start)){ echo "Data Error"; exit; } $eu = ($start - 0); $limit = 12; // No of records to be shown per page. $this1 = $eu + $limit; $back = $eu - $limit; $next = $eu + $limit; /////////////// WE have to find out the number of records in our table. We will use this to break the pages/////// $query2=" SELECT * FROM videos WHERE approved = 1 ORDER BY id ASC"; $result2=mysql_query($query2); echo mysql_error(); $nume=mysql_num_rows($result2); /////// The variable nume above will store the total number of records in the table//// /////////// Now let us print the table headers //////////////// ?>
|
|
Check back often since this page is updated as soon as I create new videos. |
|
| \n";
echo " \n"; echo "$noticia[title] \n"; echo " \n"; echo "$noticia[vid_code] \n"; echo " \n"; echo "$noticia[description] \n"; echo " | \n";
echo " \n";
}
else
{
echo "||
| \n";
echo " \n"; echo "$noticia[title] \n"; echo " \n"; echo "$noticia[vid_code] \n"; echo " \n"; echo "$noticia[description] \n"; echo " | \n";
}
$counter++;
}
echo "
| "; //// if our variable $back is equal to 0 or more then only we will display the link to move back //////// if($back >=0) { print "PREV"; } //////////////// Let us display the page links at center. We will not display the current page as a link /////////// echo " | "; $i=0; $l=1; for($i=0;$i < $nume;$i=$i+$limit){ if($i <> $eu){ echo " $l "; } else { echo "$l";} /// Current page is not displayed as link and given font color red $l=$l+1; } echo " | "; ///////////// If we are not in the last page then Next link will be displayed. Here we check that ///// if($this1 < $nume) { print "NEXT";} echo " |