ok im working on a line of code that will let the user customize there post and i want to let them change the font style and color i have the color part working but i cant get the style to work im new at this so i need help and my stupid little brother dosent know lol

<font face=<?php echo $fontstyle ?>><font color=<?php echo $fontcolor ?>> <?php echo $discription ?></font>

    So, what is the output you do get?

    You should:

    Add ; after the echo commands:

    <?php echo $fontstyle; ?>

    The $discription should perhaps be $description

    If you get these settings through a posted form, you may need to use:
    <?php echo $_POST[fontstyle]; ?>

    J.

      ive extracted the $_Post
      and my output changes the font color but not the style

        What is the outputted HTML of your script?

        Is that correct? Or is nothing coming there?

        J.

          <font face=arial> or what ever i put in there times or sanserif so its getting the variable its just not changing the style

            So it is not a PhP problem anymore.

            you should have a look at the css manual, or check whether the font style tag even exists. (I use only linked CSS files, and am not sure how to code inline CSS).

            Maybe someone else knows..

            J.

              Try:

              <font face=<?php echo $fontstyle ?> color=<?php echo $fontcolor ?>> <?php echo $description ?></font>

              that's presuming that $description is your text input.

                Try also catching up with the twenty-first century: the <font> tag has been deprecated for several years, and attribute values should be quoted.

                <span style="font-family:'<?php echo $fontstyle?>'; color:<?php echo $fontcolor?>;?>"><?php echo $description?></span>

                  If you note Leatherback's mention of linked stylesheets, you may well find that with work all of your custom styling could be moved out of the document entirely, so that you only need to supply a custom stylesheet. That, after all, is what stylesheets are for.

                    Write a Reply...