php странициране!

kristiqn2

Registered
Имам една готова система за запознанства и искам когато се разглеждат снимките да добавя странициране но не мога да се оправя нещо. :(
ето го кода:
PHP:
<table border="0" width="100%" cellspacing="2" cellpadding="2">
<tr>
<td style="background: #39b73c;" width="100%" height="30"><table border="0"><tr><td><? if($_SESSION['username']) { if($urow['level'] == "admin") { echo '<a href="admin.php?p=photo&a=delete&id='.$pid.'"><img src="images/delete.png" width="13" border="0"></a>'; } if($urow['level'] == "moderator") { echo '<a href="mod.php?p=photo&a=delete&id='.$pid.'"><img src="images/delete.png" width="13" border="0"></a>'; }  } ?></td><td><span style="color: #ffffff; font-size:14px;"><b>Снимка на <a href="<? echo $siteurl.$r[user]; ?>"><? echo $r['user']; ?></a></b></span></td></tr></table></td>
</tr>
</table>

<br />

<center><a href="<? echo $r['pic_big']; ?>" target="_blank"><img src="<? echo $r['pic_big']; ?>" width="427px" class="picture" border="0"></a></center>

<br />
<table border="0" width="100%">
<tr>
<td width="100%" class="bord2" height="25" align="left"><table border="0" width="100%"><tr><td><table border="0"><tr><td><b>Коментари (<? echo mysql_num_rows(mysql_query("SELECT * FROM pcomments WHERE pid='$id'")); ?>)</b></td></tr></table></td><td align="right"></td></tr></table></td>
</tr>
 

Горе