Jump to content

syntax to make $_POST[caption1] a different color and size using generated


patty mac

Recommended Posts

I'm taking a class in php and am stuck.

 

Our instructor had us make a table: 3 column.

 

Each column has an image and a caption.  However, each caption has a little form to change its color and then a random number generator to change its size.  I have the color and random number generator working, but don't know how to apply them to the caption.

 

This is the syntax I have (at the moment--I've tried many, many ways--single line and multiple lines)

 

  <?php

      print "<font color=\"$_POST[$color1]\" size=\"[$fsize1]\"> $_POST[caption1] </font>";         

    ?>

 

Where caption1 is the caption (duh), color1 is the generated color (from radio buttons listing red, green and blue) and $fsize1 is the randomly generated font size.

 

Suggestions?

 

Thanks a ton!

 

Patty Mac

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.