Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HTML in a Comment Box

Status
Not open for further replies.

PcLinuxGuru

Technical User
Nov 17, 2001
178
US
What I am trying to do is get a php generated table to go inide a normal comment box on a form as the value.

Client needs to be able to copy paste a table into a forum in a table structure so I need to include all the html tags as well as the data itself into a comment box. If there is a way to even show the code outside of a comment box (like alltext on a html page) that would work as well.

Any helpful hints would be appreciated :)

 
Hi

Huh ? I am not sure I understand you.

No, you can not put formatted text into a [tt]textarea[/tt] element. But you can put it in a [tt]div[/tt] as [tt]innerHTML[/tt].

Yes, you can put HTML source into a [tt]textarea[/tt]. But you can put the characters with special meaning as entities.
Code:
<textarea cols="80" rows="25"><?php echo [url=http://php.net/manual/en/function.htmlspecialchars.php]htmlspecialchars[/url]([green][i]$thestring[/i][/green]); ?></textarea>

Feherke.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top