Oto kod :
<?php require 'header.php'; include("connect.php"); $bazadanych; $perPage = 3; $page = (int) $_REQUEST['page']; if ($page < 1) { $page = 1; } } else { $page = 1; } $start = ($page - 1) * $perPage; //SELECT * FROM art LIMIT 0 , 4 - gdy jestes na stronie glownej $query = "SELECT * FROM filmiki ORDER BY `filmiki`.`id` DESC LIMIT ".$start." , ".$perPage; { echo '<div class="art-post-inner art-article"> <div class="art-postmetadataheader"> <h2 class="art-postheader"> <center>'.$rekord["nazwa"].'</center> </h2> </div> <div class="art-postcontent"> <p><center><iframe width="560" height="345" src="http://www.youtube.com/embed/'.$rekord["link"].'" frameborder="0" allowfullscreen></iframe></center></p> </div> <div class="cleared"></div> </div>'; } $prev = $page - 1; $next = $page + 1; $prevLink = $_SERVER['PHP_SELF'] . '?page=' . $prev; $nextLink = $_SERVER['PHP_SELF'] . '?page=' . $next; $page = (int) $_REQUEST['page']; if ($page != 1) { } } require 'footer.php'; ?>