Hello
I wrote a script to put SQL data into a html document. Into 5 Coloms and then a new row, but it doesn't work. He put the data into one colom (Cel data, new row | cel data, new row...)
This is my code:
<?php
include("config.inc.php");
include("functies.inc.php");
jumpbox_cat();
if($categorie){
$query = "SELECT * FROM kaarten WHERE cat_id='$categorie'";
$resultaat = mysql_query($query) or die(mysql_error());
$tr = "1";
echo"<table border='1' width='100%'><tr>";
while ($record = mysql_fetch_object($resultaat)){
echo "<td><img alt='$record->naam' src='$record->url_th'></td>";
$tr++;
if ($tr = "5") {
echo "</tr><tr>";
$tr="1";}
for($i = 1; $i <= 6; $i++){
}}
echo("</tr></table>");
}
else {
echo "<br><strong>Er werd geen categorie geselecteerd.</strong>";
}
?>