I cant figure out why it isnt working.
I put I think all the correct things.
Here is how it looks:
But for some reason its showing the same color for all the rows.
Preview: http://brian.ubietymedia.com/project/
You can see that the first row is the same color instead of alternating green and red.
If the whole script is needed, il be glad to post it.
I put I think all the correct things.
Here is how it looks:
PHP Code:
<?php
//alternating row colors
$color1 = "#CCFFCC";
$color2 = "#BFD8BC";
$i = 1;
while($rows=mysql_fetch_array($result)){
if($i%2 == 1) {
$color = $color1; }
else { $color = $color2; }
?>
<tr>
<td align="center" bgcolor="<?php echo $color; ?>"><input name="checkbox[]" type="checkbox" id="checkbox[]" value="<? echo $rows['id']; ?>"></td>
Preview: http://brian.ubietymedia.com/project/
You can see that the first row is the same color instead of alternating green and red.
If the whole script is needed, il be glad to post it.

Comment