New Lines In Text Areas

 
Post new topic   Reply to topic    Aprelium Forum Index -> PHP
View previous topic :: View next topic  
Author Message
mjjk91
-


Joined: 03 Feb 2004
Posts: 75
Location: Australia

PostPosted: Thu Dec 02, 2004 11:32 pm    Post subject: New Lines In Text Areas Reply with quote

G'Day All,

A Small question. Probably really easy to answer, but one i am curious about. Its more of a html/javascript question i believe. Anyways. The issue i am having is that when users are typing text into a textarea, and they then hit the enter key to represent a new line, when the message is processed and displayed on-screen, instead of viewing that new line that the user entered, the output is all jammed together, that is, the new line is not displayed. Any ideas why this would be? Is there a condition i need to set with my textarea to avoid this from happening, or do i need to implement some code to fix this?

Thanks all


Mick Koch
http://www.joeysfc.com
_________________
Back to top View user's profile Send private message Visit poster's website MSN Messenger
mjjk91
-


Joined: 03 Feb 2004
Posts: 75
Location: Australia

PostPosted: Fri Dec 03, 2004 1:50 am    Post subject: Fixed Reply with quote

G'Day All,

No worries peoples, i have fixed the problem. Used the command:

echo nl2br($var);

Cheers


Mick Koch
http://www.joeysfc.com
_________________
Back to top View user's profile Send private message Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> PHP All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group