It's very simple! When you've a <textarea name="text"></textarea>, and want
per example to insert it into the database, use the PHP function nl2br() at
the moment after select and print the data.
So, it will be:
- first insert the $text into the database
- SELECT text FROM XXX et. etc.
- $text = nl2br($text); (PHP inserts <br>'s into $text)
You can also directly use the function nl2br and print the string after
submitting the form!
----- Original Message -----
From: "James Smith" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, January 31, 2001 1:18 PM
Subject: [PHP-DB] newlines in <textarea> boxes..
> Alright, on my site, I have a news section, whenever i
> goto insert new news in the Admin area, I have to
> insert <br> or /n in it, while typing in the news.
> How do I make this a automated process I know it can
> be done, but addslashes doesn't work and
> htmlspecailchars() doesn't work what will?
> Get personalized email addresses from Yahoo! Mail - only $35
> a year! http://personal.mail.yahoo.com/
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]