AshleyByrom Posted July 25, 2009 Share Posted July 25, 2009 Okay well I am setting up a messaging system and a few other things but I have a problem. Say for example in a message, the user types: Hello there. My name is Ashley When sent to the database and brought back in a different page it says. Hello there. My name is Ashley How do I keep that new line? Thanks Quote Link to comment https://forums.phpfreaks.com/topic/167383-solved-php-mysql-new-lines/ Share on other sites More sharing options...
ignace Posted July 25, 2009 Share Posted July 25, 2009 http://us2.php.net/manual/en/function.nl2br.php Quote Link to comment https://forums.phpfreaks.com/topic/167383-solved-php-mysql-new-lines/#findComment-882594 Share on other sites More sharing options...
wildteen88 Posted July 25, 2009 Share Posted July 25, 2009 Make sure you use that function suggested by ignace when you grab the data from the database. Not when you insert data into the database Quote Link to comment https://forums.phpfreaks.com/topic/167383-solved-php-mysql-new-lines/#findComment-882642 Share on other sites More sharing options...
.josh Posted July 25, 2009 Share Posted July 25, 2009 btw ignace, we have a shortcut to php functions. You can do [m]functionname[/m] Quote Link to comment https://forums.phpfreaks.com/topic/167383-solved-php-mysql-new-lines/#findComment-882655 Share on other sites More sharing options...
AshleyByrom Posted July 25, 2009 Author Share Posted July 25, 2009 Arw man I love this forum!! Thanks again guys! Quote Link to comment https://forums.phpfreaks.com/topic/167383-solved-php-mysql-new-lines/#findComment-882782 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.