There is some html text stored in the Database which I want to show in an html text area as it was in the Database.
Text in DB is:
<SPAN STYLE= "" >I should have known this....</SPAN>
but when I show it in the text area it gets displayed as:
I should have known this
</SPAN>
">
I am filling the text area like so:
<textarea class="inputtext" name="content" value="<?=$row2['contentFull']?>">
If you want to have a default value in a
TEXTAREAyou need to code it like this:It’s because
TEXTAREAdoes not have thevalueattribute nor is it a singular or unpaired tag likeINPUT. It is instead a paired tag. One where you have to have both the opening and a closing tag.Make sure also that unless you want an extra line break showing, to have the start of your output right after the opening
TEXTAREAtag.