Editbox and echo statement
Posted: Fri May 07, 2021 6:46 pm
I use PHP frequently in WWB projects. I would like to be able to control formatting (font size, color) when using the echo statement within an editbox.
The statement below used within a PHP script obediently writes it to the top line on my page with proper formatting.
echo "<p> <font color=blue font face='arial' size='12pt'>($_SESSION["DocumentTitle"]) </p>";
However, when I embed it within an editbox inside a form using the statement below
<?php echo( "<p> <font color=blue font face='arial' size='12pt'>($_SESSION["DocumentTitle"]) </p>" ); ?>
The following shows up in the editbox when I run the project
<p> <font color=blue font face='arial' size='12pt'>One line simple string in blue color, arial font and font size 12pt</font> </p>
I have successfully used <?php echo("Hello World"); ?> type statements (no formatting) in editboxes before.
Can anyone unravel this mystery for me?
Much appreciated.
Harry Jones
The statement below used within a PHP script obediently writes it to the top line on my page with proper formatting.
echo "<p> <font color=blue font face='arial' size='12pt'>($_SESSION["DocumentTitle"]) </p>";
However, when I embed it within an editbox inside a form using the statement below
<?php echo( "<p> <font color=blue font face='arial' size='12pt'>($_SESSION["DocumentTitle"]) </p>" ); ?>
The following shows up in the editbox when I run the project
<p> <font color=blue font face='arial' size='12pt'>One line simple string in blue color, arial font and font size 12pt</font> </p>
I have successfully used <?php echo("Hello World"); ?> type statements (no formatting) in editboxes before.
Can anyone unravel this mystery for me?
Much appreciated.
Harry Jones