patty mac Posted October 6, 2008 Share Posted October 6, 2008 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 Link to comment https://forums.phpfreaks.com/topic/127253-syntax-to-make-_postcaption1-a-different-color-and-size-using-generated/ Share on other sites More sharing options...
F1Fan Posted October 6, 2008 Share Posted October 6, 2008 This is the correct syntax: <?php print "<font color=\"{$_POST[$color1]}\" size=\"$fsize1\"> {$_POST['caption1']} </font>"; ?> Link to comment https://forums.phpfreaks.com/topic/127253-syntax-to-make-_postcaption1-a-different-color-and-size-using-generated/#findComment-658181 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.