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 //////////////// ?> Misfit Productions Videos
about me
Misfit Productions Videos
Here is some of my video work.
Check back often since this page is updated as soon as I create new videos.
 
We currently don't have any videos in our database."; } else { $counter = 0; //////////////// Now we will display the returned records in side the rows of the table///////// while($noticia = mysql_fetch_array($result)) { $id_page = $noticia[description]; if ( $counter&1 ) { echo " \n"; echo " \n"; } else { echo " \n"; echo " \n"; } $counter++; } echo " \n"; } ////////////////////////////// End of displaying the table with records //////////////////////// /////////////////////////////// if($nume > $limit ){ // Let us display bottom links if sufficient records are there for paging /////////////// Start the bottom links with Prev and next link with page numbers ///////////////// echo "
\n"; echo "
\n"; echo "
\n"; echo "$noticia[title] \n"; echo "
\n"; echo "$noticia[vid_code] \n"; echo "
\n"; echo "$noticia[description] \n"; echo "
\n"; echo "
\n"; echo "
\n"; echo "
\n"; echo "$noticia[title] \n"; echo "
\n"; echo "$noticia[vid_code] \n"; echo "
\n"; echo "$noticia[description] \n"; echo "
\n"; 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 "
"; }// end of if checking sufficient records are there to display bottom navigational link. ?>