corillo181 Posted June 16, 2006 Share Posted June 16, 2006 this a code dividing picture sin different pages.. can any one tell me why does the pictures in the other pages, got the same link as the one in the first page...[code]$query=mysql_query("SELECT path,photo_id FROM tra_cotm_photo WHERE cotm_id='".$info['cotm_id']."' ORDER BY photo_id DESC LIMIT $cut,$max_page ")or die (mysql_error());$get_num=mysql_result(mysql_query("SELECT COUNT(*) FROM tra_cotm_photo WHERE cotm_id=".$info['cotm_id'].""),0);$total_pages=ceil($get_num / $max_page);if($_GET['m']==$info['cotm_id']){while($path=mysql_fetch_array($query)){ if($i % $limit != 1) { ?><td align="center"><a href="cfv.php?m=<?php echo $info['cotm_id'];?>&p=<?php echo $i; ?>"><img border="0" height="90" width="110" src="<?php echo $path['path'];?>"></a></td><?php } else { ?> </tr><tr><td align="center"><a href="cfv.php?m=<?php echo $info['cotm_id']; ?>&p=<?php echo $i;?>"><img border="0" height="90" width="110" src="<?php echo $path['path'];?>"></a></td><?php } $i++; }}else{} <?php if($_GET['m']==$info['cotm_id']){?> <tr> <td colspan="3" align="center"> <?phpfor($i = 1; $i <= $total_pages; $i++){ if(($page) == $i){ echo "$i "; } else { echo "<a href=\"".$_SERVER['PHP_SELF']."?m=".$info['cotm_id']."&page=$i\">$i</a> "; } } }else{} ?>[/code][b]EDITED BY WILDTEEN88: PLEASE USE SUITABLE TOPIC TITLES WHEN POSTING A NEW TOPIC. I HAVE CHANGED THE TITLE FOR YOU.[/b] Link to comment https://forums.phpfreaks.com/topic/12171-pictures-got-the-same-link/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.