Does anyone know how I'd go about making the row colors of my HTML table alternate between a red background and a white background?
Heres my code:
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<?php do { ?>
<tr><td><a href="javascript:;" onClick="MM_openBrWindow('details.php?id=<?php echo $row_get_associations_normal['customerid']; ?>','','menubar=yes,scrollbars=yes,resizable=yes,width=300,height=400')"><?php echo $row_get_associations_normal['customername']; ?></a></td></tr>
<?php } while ($row_get_associations_normal = mysql_fetch_assoc($get_associations_normal)); ?>
</table>
My mySQL code above this is:
mysql_select_db($database_cons, $cons);
$query_get_associations_normal = sprintf("SELECT * FROM tblassociations, tblcustomers WHERE customerid = assoccustid AND customercounty = '%s' AND assoccategory = '%s'", $thecounty_get_associations_normal,$thecat_get_associations_normal);
$get_associations_normal = mysql_query($query_get_associations_normal, $cons) or die(mysql_error());
$row_get_associations_normal = mysql_fetch_assoc($get_associations_normal);
$totalRows_get_associations_normal = mysql_num_rows($get_associations_normal);