dsartain Posted March 13, 2006 Share Posted March 13, 2006 RESOLVED!!!!! Hey, I'm trying to use PHP to control font properties by having PHP pull info from a DB that someone submitted. They go to one page, fill out a form with the font face, color, and weight, submit that to the DB, then index.php pulls the info from the DB. I've used the echo to verify that the info is being pulled from the DB, and it is. I've gotten the face and color to work with: <font face=" <?php echo $font ?>" color= "<?php echo $color ?>" ><br /><?php echo $nicetext; ?><!--Whatever you want to put here!!!!!--></font>but I don't know how to do the weight...bold, italic, etc...Can anyone help with this??? Link to comment Share on other sites More sharing options...
keeB Posted March 13, 2006 Share Posted March 13, 2006 [!--quoteo(post=354394:date=Mar 13 2006, 03:25 AM:name=Don)--][div class=\'quotetop\']QUOTE(Don @ Mar 13 2006, 03:25 AM) [snapback]354394[/snapback][/div][div class=\'quotemain\'][!--quotec--]Hey, I'm trying to use PHP to control font properties by having PHP pull info from a DB that someone submitted. They go to one page, fill out a form with the font face, color, and weight, submit that to the DB, then index.php pulls the info from the DB. I've used the echo to verify that the info is being pulled from the DB, and it is. I've gotten the face and color to work with: <font face=" <?php echo $font ?>" color= "<?php echo $color ?>" ><br /><?php echo $nicetext; ?><!--Whatever you want to put here!!!!!--></font>but I don't know how to do the weight...bold, italic, etc...Can anyone help with this???[/quote]<font style="font-weight: bold; text-decoration: underline"> ETCCCCCCCCCC.good luck Link to comment Share on other sites More sharing options...
kenrbnsn Posted March 13, 2006 Share Posted March 13, 2006 Actually, you shouldn't use the <font> tag at all, but the <span> & </span> tags with the style="" option.Read up on CSS for all the information.Ken Link to comment Share on other sites More sharing options...
phporcaffeine Posted March 13, 2006 Share Posted March 13, 2006 [!--quoteo(post=354406:date=Mar 13 2006, 12:00 AM:name=kenrbnsn)--][div class=\'quotetop\']QUOTE(kenrbnsn @ Mar 13 2006, 12:00 AM) [snapback]354406[/snapback][/div][div class=\'quotemain\'][!--quotec--]Actually, you shouldn't use the <font> tag at all, but the <span> & </span> tags with the style="" option.Read up on CSS for all the information.Ken[/quote]Unless you want W3C to spank you! P.S I noticed in your above code you had <?php $font ?> Don't forget that it needs to be <?php $font; ?> I assume that was just a post typo though. Link to comment Share on other sites More sharing options...
kenrbnsn Posted March 13, 2006 Share Posted March 13, 2006 If you have only one statement between the PHP tags "<? ?>", you don't need the terminating semi-colon since the "?>" closes the statement. See [a href=\"http://www.php.net/manual/en/language.basic-syntax.instruction-separation.php\" target=\"_blank\"]http://www.php.net/manual/en/language.basi...-separation.php[/a] for an explanation. This is one of the quirks in PHP along with not needing braces surrounding a statement block, if there is only one statement in the block. See [a href=\"http://ww.php.net/manual/en/language.control-structures.php\" target=\"_blank\"]http://ww.php.net/manual/en/language.control-structures.php[/a] for an explanation.Ken Link to comment Share on other sites More sharing options...
Recommended Posts