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 

      <td height="10" bgcolor=<? echo $bg; ?> id="ph1"><font size="-2" face="Arial, 
Helvetica, sans-serif">1</font> 
      <td height="10" bgcolor=<? echo $bg; ?> id="ph2"><font size="-2" face="Arial, 
Helvetica, sans-serif">2</font> 
      <td height="10" bgcolor=<? echo $bg; ?> id="ph3"><font size="-2" face="Arial, 
Helvetica, sans-serif">3</font> 
      <td height="10" bgcolor=<? echo $bg; ?> id="ph4"><font size="-2" face="Arial, 
Helvetica, sans-serif">4</font> 

now using a switch statement eg 

        switch( $bg )
                case "red":
                        print( "#FF0000" );
                        //a few more colours in here
                        print( "#FFFFFF" );
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?


"the only dumb question is the one that wasn't asked" 

Reply via email to