可能重复:
上一个/下一个按钮?
我怎样才能在我的画廊脚本中制作下一页和上一页..什么时候
mid = id of images
path = link of images
我需要两个按钮:next获取下一张图片,prev获取最后一张图片。我该怎么做 ?
$mid=$_GET['mid'];
$qur="select * from images where mid='$mid'";
$res=mysql_query($qur,$conn);
?>
<?php while($row=mysql_fetch_array($res)){ ?>
<div class="gallery-img">
<a href="admin/<?php echo $row['path'] ?>" rel="prettyPhoto" class="portfolio-img" title="<?php echo $row['image_title'] ?>">
<img src="admin/<?php echo $row['path'] ?>" alt="<?php echo $row['image_title'] ?>" width="100%" height="100%" />
</a>
</div>
<?php } ?>