Search the Community
Showing results for tags 'pagination'.
-
I'm trying to get all of my records to display in my PrimaryContent DIV, but only the first one does. When you click on any other pages, they display on a completely separate page. I was told to Google "passing multiple variables in a query string" but there was so much coding that I was completely lost. I was also told, "Find the place in the code where the page=xxx is set in the URL (First << 1 2 3 etc.). Add your Menukey to the Query String. Every time the page reloads, check for the MenuKey and let the Function check for the Page Number." The part I don't really understand is how I add my menukey to the query string. Any help would be appreciated. If you need to see any specific code let me know. My page is here so you can see for yourself: http://itd1.cincinnatistate.edu/php_vondrelld/index.php?menukey=8 Scroll to the bottom and click another page and you'll see what I mean. Thanks so much!
-
Hi friends, i have a problem. i try to make pagination. I didn't added numbers and the number stayed next to the images. Numbers is no display and it is next the images. And i don't want to give "padding-left" for first image but when i use "padding-left" for images, it is giving all of them. <?php $sayfa = intval($_GET["sayfa"]); if(!$sayfa) {$sayfa = 1;} $say = $db->query("SELECT * FROM resimlerekle"); $toplamveri = $say->rowCount(); // Verileri Saydırdık $limit = 8; $sayfa_sayisi = ceil($toplamveri/$limit); if($sayfa > $sayfa_sayisi) { $sayfa = 1; } $goster = $sayfa * $limit - $limit; $gorunensayfa = 6; $resimcek = $db->query("SELECT * FROM resimlerekle ORDER BY cokluresimekle_id DESC LIMIT $goster,$limit"); $resimlerial = $resimcek->fetchAll(PDO::FETCH_ASSOC); ?> <?php foreach ($resimlerial as $resim) { ?> <div style="float: left; padding-left: 10px;"> <div><img <?php echo $resim; ?> style="max-width:250px;" src="../../../upload/cokluresim/<?php echo $resim["cokluresimekle_resim"]; ?>" ></div> <div style="max-width:250px; max-height:50px; background-color:#d6d4d4; line-height:50px; text-align:center;"><?php echo $resim['cokluresimekle_baslik']; ?></div> </div> <?php } ?> <!-- Benim Eklediğim Kodlar Bitiş --> <?php if ($sayfa > 1) { ?> <span><a href="index.php?sayfa=1">İlk</a></span> <div><a href="index.php?sayfa=<?php echo $sayfa - 1 ?>">Önceki</a></div> <?php } ?> <?php for($i = $sayfa - $gorunensayfa; $i < $sayfa + $gorunensayfa +1; $i++) { if($i > 0 and $i <= $sayfa_sayisi) { if($i == $sayfa) { echo '<span>'.$i.'</span>'; }else{ echo '<a href="index.php?sayfa='.$i.'">'.$i.'</a>'; } } } ?> <?php if ($sayfa != $sayfa_sayisi) { ?> <div><a href="index.php?sayfa=<?php echo $sayfa + 1 ?>">Sonraki</a></div> <div><a href="index.php?sayfa<?php echo $sayfa_sayisi ?>">Son</a></div> <?php } ?>
-
Hi everyone! I'm creating a blog for someone here: http://test4.neshayasmin.com/ I've used this theme as my foundation, but I'm making changes to its appearance: http://themeforest.net/item/novelty-retina-ready-responsive-wordpress-theme/4367335 I want to change the appearance of the older/newer buttons at the bottom. At the moment each page is numbered at the bottom of the blog, but I want to have an 'older posts' and a 'newer posts' link instead. I don't have very good knowledge of php. Any help would be wildly appreciated, friends. Let me know if you need any more info.
- 7 replies
-
- pagination
- php
-
(and 2 more)
Tagged with: