thanks but this is not working either, still coming up with a parse error.um, its probably something stupid, but i dont know what it could be. What i am trying to do is more than just change the bgcolor, i want it to put in additional images every (just a few curves and that to break up the displaying of the items (picture, description etc). So thats why you didnt see the bgcolors in that last script i posted. this is the code, if you are interested (havent actually changed the images etc in the else part of it, but you can see what i am trying to do here hopefully)...thanks for your help
$result = mysql_query("SELECT * FROM general WHERE catagory='$catagory'",$db);
$cnt=0;
echo "<table width=\"100%\" bgcolor=\"#ffffff\" cellpadding=\"0\" cellspacing=\"0\">";
$title ='';
$image = '';
while ($myrow = mysql_fetch_array($result)){
$cnt++;
if (($cnt % 2) == 0) {
echo "<tr><td colspan=\"8\" bgcolor=\"#ffffff\" height=\"15\">
<img src=\"images/fifteen.gif\" border=\"0\" height=\"15\"></td></tr>
<tr><td rowspan=\"2\" align=\"left\" style=\"border-left:#ffffff 15px solid;border-right:#ffffff 15px solid\">
<a href=\"javascript:opensmall('larger.php?title=$myrow[name]&image=$myrow[image_name]')\">
<img src=\"images/thumbnails/".$myrow["image_name"]."\" border=\"0\"></a></td>
<td bgcolor=\"#C7CAA0\" height=\"24\" valign=\"top\"><b>$myrow[name]</b></td>
<td height=\"24\" colspan=\"4\" bgcolor=\"#ffffff\" valign=\"top\"><img src=\"images/twtyfour.gif\" border=\"0\"
height=\"24\"> </td></tr>
<tr>
<td width=\"350\" colspan=\"4\" align=\"left\" valign=\"top\">$myrow[description]</td>
<td width=\"150\" align=\"center\"><b>$myrow[price]</b></td>
<td width=\"150\" align=\"center\" class=\"normal\">
<a href=\"mailto:jeff_boag@hotmail.com?subject=$myrow[name]\">contact</a></td>
<td width=\"150\"> </td>
</tr>";
}
else {
echo " <tr><td height=\"15\" colspan=\"8\" bgcolor=\"#ffffff\"><img src=\"images/fifteen.gif\" border=\"0\"></td></tr>
<tr><td rowspan=\"2\" align=\"left\" style=\"border-left:#ffffff 15px solid;border-right:#ffffff 15px solid\">
<a href=\"javascript:opensmall('larger.php?title=$myrow[name]&image=$myrow[image_name]')\">
<img src=\"images/thumbnails/".$myrow["image_name"]."\" border=\"0\"></a></td>
<td bgcolor=\"#ffffff\" height=\"24\" valign=\"top\"><b>$myrow[name]</b></td>
<td height=\"24\" colspan=\"4\" bgcolor=\"#ffffff\" valign=\"top\"><img src=\"images/twtyfour.gif\" border=\"0\"
height=\"24\"> </td></tr>
<tr>
<td width=\"350\" colspan=\"4\" align=\"left\" valign=\"top\">$myrow[description]</td>
<td width=\"150\" align=\"center\"><b>$myrow[price]</b></td>
<td width=\"150\" align=\"center\" class=\"normal\">
<a href=\"mailto:admin@shop.com?subject=$myrow[name]\">contact</a></td>
<td width=\"150\"> </td>
</tr>";
}
}
echo "</table></body>\n";
?>