Well the only one that kinda worked was
//the while loop
while($r=mysql_fetch_array($result))
{
//getting each variable from the table
$time=$r["time"];
$id=$r["id"];
$message=$r["message"];
$name=$r["name"];
?>
<? echo ($color = !$color) ? '#aabbcc': '#ddeeff'; ?>
<? echo $time ?><br>
<b><? echo $name ?>:</b> <? echo $message ?><br><hr
color="#000000" size="1" style="dotted"><br>
<? } ?>
But it alternate the code rather than placing the actual colours.
Then when I tried codes like this, it just says there's an error on the lines I placed them in:
$bgcolor="black";
while(something)
{
echo $bgcolor;
if ($bgcolor=="black")
{
$bgcolor="white";
}
else
{
$bgcolor="black";
};
...It's most likely because I don't really know where to place them. :queasy: I usually put it just above the <? echo ?> codes