Hi All.
Please help me.
I want to show 3 images per row and show 5 rows per page, that would be 3 images X 5 rows = 15 images. per page and then press next to go to next page to see if there are more images for that user. This is a script for making two users friends of each other. Here is my code.
<?php
$sql="select * from members_contacted where mem_contact_id = $_SESSION[user_id] and accepted='1'";
$res=mysql_query($sql);
$num_rows=mysql_num_rows($res);
while($data_set=mysql_fetch_array($res))
{
//$sql="select from users a, occupation b where a.occupation = b.value and a.auto_id=$data_set[my_id]";
$sql="select from users where auto_id=$data_set[my_id]";
$result=mysql_query($sql);
$d_s=mysql_fetch_array($result);
?>
<td width='33%' class='reg_left'>
<div align='center'>
<img src="image_gd/profile_image1.php?<?=$d_s["photo_url"]?>" border="0"></a>
<br>
<?php
if($data_set["accepted"]=='1')
{
print "Accepted";
}
else
{
print "<a href='accept_message.php?mess_id=$data_set[contact_id]'>Accept</a>";
}
?>
<br>
<a href="profile.php?username=<?=$d_s["username"]?>" class="smallbluelink"><?=$d_s["username"]?></a>
<br>
<a href='send_message.php?contact=<?=$d_s["username"]?>'>Send Message</a></b>
</div>
</td>
<?php
}
?>
I want to iterate the results and show in new row after 3rd image. Please tell me what should I do with my script and where that it works. I tried i=0 and i++ thing but dont know where to put so it doesn't work.
thanks please help.
the result that it shows currently is this.
the result can be seen here http://www.apnaydesi.com/images/onmysite.jpg
please let me know if more code is required.
I would really appreciate if anyone can help. thanks