OKay we're going to have to make this as blatant as we can:
function frontProducts() {
$sql = "SELECT * FROM products ORDER BY RAND() LIMIT 0,6";
$rs=$this->bd->executeSQL($sql);
$n=0;
echo "<table>"
while(mysql_fetch_row($rs))
// dont know why you had a && n<3 in here - the variable is called $n, but even then it would only make the while run three times - it's [b]still[/b] the <br>'s that are spacing the thing out - I dont know how you intended to do it without a table...
{
if ($n == 0)
echo "<tr>";
echo "<td>";
echo "<center><img src=\"images/".mysql_result($rs, $n, "foto")."\"><br><br>";
echo "".mysql_result($rs, $n, "category")."<br>";
echo "<a href=\"index.php?page=product&cod=".mysql_result($rs, $n, "cod")."\">".mysql_result($rs, $n, "model")."</a><br>";
echo "<b>".mysql_result($rs, $n, "price")."€</b><br>";
$n++;
echo "</td>";
if ($n == 0)
{
$n = 0;
echo "</tr>";
}
$n++;
}
echo "</table>";
}
IF that doesnt work, then please post a response which is of more use than "blank screen" - it should at least give some errors, or output some HTML.
You will also notice that all I've done above is use the code that i posted before and inserted your code into it in the bits I told you to (just slightly modified to add the start and end tables - realised there was no need for the modulus function). If there's any part you dont understand then please shout.