howdy all
my aim is to have a user submit a form and then from there replace cell colours with
in a table. I'm referencing the cells by cell id's eg
<tr>
<td height="10" bgcolor=<? echo $bg; ?> id="ph1"><font size="-2" face="Arial,
Helvetica, sans-serif">1</font>
</td>
<td height="10" bgcolor=<? echo $bg; ?> id="ph2"><font size="-2" face="Arial,
Helvetica, sans-serif">2</font>
</td>
<td height="10" bgcolor=<? echo $bg; ?> id="ph3"><font size="-2" face="Arial,
Helvetica, sans-serif">3</font>
</td>
<td height="10" bgcolor=<? echo $bg; ?> id="ph4"><font size="-2" face="Arial,
Helvetica, sans-serif">4</font>
</td>
</tr>
now using a switch statement eg
switch( $bg )
{
case "red":
print( "#FF0000" );
break;
//a few more colours in here
default:
print( "#FFFFFF" );
break;
}
what would be the best way to tell it what cell colours to replace on submit would it
be an if, for or a do/while statement that would be the better option ( or any others
that 4 that matter) if i wanted to have just the cells with the ids of ph2 & ph3 to
be changed?
Cheers
Peter
"the only dumb question is the one that wasn't asked"