If you go to the Staff Page at http://www.cebyrd.com/staff.php and scroll, the scroll function reads 12 lines from the database instead of 6. So 6 teachers get skipped with every click of the car button. I don’t know why it’s skipping a page. Here’s my code:
Expand|Select|Wrap|Line Numbers
- <?php
- $row_ctr = 0;
- $open_LI = false;
- while($row = $res->fetch_assoc()) {
- $row_ctr++;
- if($row_ctr % 3 == 1) {
- $open_LI = true;
- ?>
- <li>
- <?php } ?>
- <div class="img_box">
- <figure><a href="<?=$row['URI'];?>"><img src="http://bytes.com/images/staff/<?=$row['imageURI'];?>" width="182" height="186" alt=""></a></figure>
- <div>
- <p><a href="<?=$row['URI'];?>"><span class="red_font"><?php printf("%s %s",$row['firstname'],$row['lastname']);?></span><br>
- <?=$row['title']?> - <?=$row['dept']?></a></p>
- <a href="mailto:<?=$row['email']?>"><?=$row['email']?></a><br>
- <?=$row['phone']?>
- </div>
- </div>
- <?php
- if($row_ctr % 3 == 0) {
- $open_LI = false;
- ?>
- </li>
- <?php }
- }
- if($open_LI) {
- $open_LI = false;
- ?>
- </li>
- <?php
- }
- ?>