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

How to display < and > in textarea

P: n/a
Hello.

I designed a form to edit some DataBase's fields. But some
of these fields contain '<' and '>' characters. And
these characters are '<' and '>' in HTML.

So if want to edit these fields, the form converts them
into '<' and '>'. And I want to mantain '&lt;' and '&gt;'

Mi piece of code:
----------
<textarea name=mytext rows=14 cols=60 wrap=virtual>$DBrow->text</textarea>
----------

Any suggestion? Thank you very much.
Jul 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Francesco Moi wrote:
I designed a form to edit some DataBase's fields. But some
of these fields contain '&lt;' and '&gt;' characters. And
these characters are '<' and '>' in HTML.

So if want to edit these fields, the form converts them
into '<' and '>'. And I want to mantain '&lt;' and '&gt;'


Use &amp; for &.
--
David Dorward <http://dorward.me.uk/>
Jul 20 '05 #2

P: n/a
Francesco Moi <fr**********@europe.com> wrote:
I designed a form to edit some DataBase's fields. But some
of these fields contain '&lt;' and '&gt;' characters. And
these characters are '<' and '>' in HTML.

So if want to edit these fields, the form converts them
into '<' and '>'. And I want to mantain '&lt;' and '&gt;'


You need to escape the ampersands as &amp; like this:

&lt; becomes &amp;lt;
&gt; becomes &amp;gt;
--
Darin McGrew, mc****@stanfordalumni.org, http://www.rahul.net/mcgrew/
Web Design Group, da***@htmlhelp.com, http://www.HTMLHelp.com/

"It said 'Insert disk #3', but only two will fit..."
Jul 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.