Separating Lines in Textfields

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Caped Knight
Forum Commoner
Posts: 33
Joined: Wed Jan 01, 2003 6:20 pm
Location: Somewhere...out there...

Separating Lines in Textfields

Post by Caped Knight »

This is something I should probably know, but...

I have a form for users to send messages to each other. It's all fine except that when the user separates to lines with enter in the form, and the string goes to the user he/she's sending it to (by database) without any line breaks. Is there any way to take care of this?

Thanks.
qartis
Forum Contributor
Posts: 271
Joined: Sat Dec 14, 2002 4:43 pm
Location: BC, Canada
Contact:

Post by qartis »

Maybe try a nl2br() on the message before it enters the database.
Post Reply