By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
439,971 Members | 1,451 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 439,971 IT Pros & Developers. It's quick & easy.

entering html and php into a db and display this in a textarea without it being processed as code

P: n/a
hi all!

how can i enter html and php into a db and display this within a
TEXTAREA without it being processed as code? do i need to replace
characters like <? with something else like say <..? or is there a more
elegant solution that tells the php parser etc to ignore this section
as it needs to be processed as text not code.

regards

marc

Sep 6 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
monomaniac21 wrote:
hi all!

how can i enter html and php into a db and display this within a
TEXTAREA without it being processed as code? do i need to replace
characters like <? with something else like say <..? or is there a more
elegant solution that tells the php parser etc to ignore this section
as it needs to be processed as text not code.

regards

marc
Before displaying any data like this you should run it through
htmlentities() to convert chars like "<" to "&lt;". Then it will
display correctly (and, BTW, not cause the code to be processed).

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
Sep 6 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.