satal keto Posted March 20, 2007 Share Posted March 20, 2007 I am presently making a website, one of the parts of this website is a messaging system. I have finished making the messaging system (well the graphics could do with a quick going over but ow well) but I have just found a problem. When the message is sent, although the message can be over many lines, it is shown (when viewed through the outbox or the inbox) on only one line. So for example Hello World Is shown in the inbox/outbox as Hello World The information is being sent to a PHP script from a textarea. The PHP script performs htmlentities on the variable holding the message (to reduce the security problems) and then stores the information in the database. I was wondering whether anyone has any idea's on how it would be possible to have the message to retain its formatting? Thanks for any help in advance Satal Keto Quote Link to comment Share on other sites More sharing options...
Orio Posted March 20, 2007 Share Posted March 20, 2007 Look into nl2br(). Orio. Quote Link to comment Share on other sites More sharing options...
satal keto Posted March 20, 2007 Author Share Posted March 20, 2007 Thats gota be the shortest answer I have ever got But works beautifully (well some problems cause tried using it before htmlentities but can fix that ) THANKS Quote Link to comment 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.