Re: html text area and mysql text fields

From: Date: Tue, 27 Jul 2004 22:32:13 +0000
Subject: Re: html text area and mysql text fields
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-192041@lists.php.net to get a copy of this message
>> i keep the string intact as well, for that exact reason, when you want >> to edit dynamically, i dont want all sorts of html tags in my >> textarea. So, the solution i found works, is to use the php funtion >> nl2br(). use that when displaying the info in html., that way you dont >> actually change the original text. >> >> JAson Also, check out the php site regarding the nl2br function and read through the user comments. Different OSes handle newlines different and nl2br does it 1 way. http://us3.php.net/manual/en/function.nl2br.php And converting with nl2br supposedly takes up more CPU. Doing many nl2br conversions can run your site/program slow. In some cases, it's better to convert before injection since disk space is more abundent than CPU cycles. -- --Matthew Sims --<http://killermookie.org>

« previous php.general (#192041) next »