Hi,
I have a dating site, where users can create a profile & add pictures.
But on the page where it shows all the users pictures, it shows them all on one row, which causes distortion on the page.
I want it to show 5 pics on each row.
So if a user uploads more than 5 pictures, it will then create another row to place the next lot on .. and so on...
Weve spent hours trying to do it, but we havent had any luck 🙁
Any help you could give us will be really appreciated.
Here is the code:
<table width="100%" border="0" align="center" class="body">
<tr>
<?
$r = mysql_query("SELECT * FROM crib_images WHERE username='".$_GET['username']."'");
if (mysql_num_rows($r) == 0) {
echo "<td align=\"center\"><font color=\"black\">This user has not uploaded any additional pics at this time</font></td>";
}
else { // otherwise
while ($ro = mysql_fetch_array($r)) {
// Gets all the info
$adlimg = $ro['imgpath'];
$id = $ro['id'];
;?>
<td>
<?
if ($ro['picstatus']=="Y"){
$status = "<a href=\"largpic.php?id=$id&username=$cribName\"><img src=\"/$adlimg\" width=\"90\" height=\"90\" border=\"1\" bordercolor=\"#000000\"></a></td>";
}
else if ($ro['picstatus']=="N"){
$status = "<img src=\"http://sitename.com/images/pending.gif\" width=\"90\" height=\"90\" border=\"1\" bordercolor=\"#000000\"><BR><font color=\"black\"><B>Awaiting Approval</B></font></td>";
} else {
$status = "";
}
echo "$status";
?>
</td>
<?
$i++;
}
}
?>
</tr>
</table>