I have a script using PHP... The only problem is I cannot limit the number of cells one beside each other. This script displays avatars. Sadly, if you have 8 avatars, you get 8 cells one beside each other. That is very ugly and ruins the page, since you have to scroll. How can I limit the number to, lets say, 5 cells per row.
Thanks Seb...
Heres my code:
PHP Code:
//start hidden avatars
$hiddenavycount=run_query("SELECT * FROM phpqa_hid_avs WHERE username='$exist[1]' AND type='hidden' ORDER BY avatar ASC");
$hiddenavycount2=mysql_num_rows($hiddenavycount);
if($hiddenavycount2 >=1){
run_query("SELECT * FROM phpqa_hid_avs WHERE name=$exist[1]");
echo "<hr>
<br>Hidden Avatars:";
echo "<p><table width='30%' cellpadding='5' cellspacing='1' border='0'>";
echo "<form action='Arcade.php?action=settings&p=avatar' method='POST'>";
while ($b = mysql_fetch_array($hiddenavycount)) {
$avatar = $b['avatar'];
echo "<td><center><img src='hidavs/$avatar.gif' border=0></a><br>$avatar<br>[<input type='radio' name='remoteavatar' value='hidavs/$avatar.gif'>]<a href=\"javascript:document.getElementsByName('remoteavatar')[$x].checked='checked';void(0);\"></td>";
}
echo"</table>";
echo "<br><br><input type=submit name='submit' value='Select'></form>";
}
//end hidden avatars
THANKS!