[SOLVED] Displaying HTML code in <textarea>
Posted: Tue Mar 29, 2005 10:01 pm
I'm in process of writing my admin module and I would like to be able to enter strings of HTML code, which are then stored in the database.
For some reason, when I retrieve the code, and addslashes to them, they seem to get truncated.
HTML is stored in the db as so:
When I retrieve it from the db using adslashes, I see this in the textarea:
<b>some stuff</b></a><img src='http://www.domain.com/image-1647300-10382409' width='1' height='1' border='0'\>'>
I'm missing the initial anchor. Any ideas what I'm doing wrong?
For some reason, when I retrieve the code, and addslashes to them, they seem to get truncated.
HTML is stored in the db as so:
Code: Select all
\<a href='http://www.domain.net/click-1647300-10382409' target='_top' >
<b>some stuff</b>
</a>
<img src='http://www.domain.com/image-1647300-10382409' width='1' height='1' border='0'\><b>some stuff</b></a><img src='http://www.domain.com/image-1647300-10382409' width='1' height='1' border='0'\>'>
I'm missing the initial anchor. Any ideas what I'm doing wrong?