Re: how to write </textarea> element in textarea?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, May 1, 2009 at 10:44 AM, Grega Leskovsek <mavricek@xxxxxxxxx> wrote:
> I am writing CMS, that will be able to edit files.
> For editing I put file inside textarea, but when I open file that has
> textarea element inside it I lose (read: don't show data in the
> textarea element.) the data after the inside </textarea> element.
> Any suggestions how can I fix this?
>
> Thanks in advance,
>

You need to use htmlspecialchars on whatever you place inside the textarea:

<textarea name="content"><?php echo htmlspecialchars($content); ?></textarea>


Andrew

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux