Hello Everyone,
I am new at this so please bare with me. :)
I've been having such a hard time with my form. I am finally down to one last little problem. I cannot get my font size to display when selected.
This is in my HTML:
<form action="processor.php" method="post">
<p>
<label>Type a font size:</label>
<input type="text" value="14" name="font-size" />
<label>Pick a color: </label>
<select name="color">
<option selected="selected" value="yellow">yellow</option>
<option value="green">green</option>
<option value="blue">blue</option>
<option value="orange">orange</option>
<option value="red">red</option>
</select>
<label>Pick a font Style: </label>
<select name="font">
<option selected="selected" value="Comic Sans MS Bold">Comic</option>
<option value="Script MT Bold">Script </option>
<option value="Garamond">Garamond</option>
<option value="Snap ITC">Snap ITC</option>
<option value="Times New Roman">Times</option>
</select>
<p>
<textarea name="box" cols="70" rows="10">
Please type the text you would like to edit in this box!
</textarea>
</p>
<p>
<input type="submit" value="Submit"/>
<input type="reset" /></p>
***********************************************
This is in my PHP:
<style type="text/css">
body { color: <?php print $_POST["color"] ?>;
font-family: <?php print $_POST["font"] ?>;
font-size: <?php print $_POST["font-size"] ?>
}
</style>
</head>
<body>
<?php print $_POST["box"] ?>
The color and font-family change when selected but the font-size doesn't change.
Please help.
Thank you