|
|
#1 (permalink) |
|
Registered User
Fresh Surpasser
Joined in Aug 2005
23 posts
Gave thanks: 0
Thanked 0 times
|
Line Breaks in Textarea Don't Work
When I type something in my guestbook/comment textarea - line breaks don't appear. It shows everything as one big block of text. Does anyone have any idea why this is? Here's the address so you can see what I mean:
http://www.alittlebitofsunshine.com/comment.html |
|
|
|
|
|
#3 (permalink) |
|
Surpass Fan
Super #1
Joined in Aug 2004
Hosted on SH58
1,688 posts
Gave thanks: 6
Thanked 7 times
|
If it's done with PHP then use nl2br(). If using Perl, then write a simple sub routine to convert it...
Code:
sub nl2br($text){
$text = preg_replace( "/\\r\\n/", "<br />" );
return $text;
}
__________________
- Evan Charlton | [site] | Server - SH58 |
|
|
|
|
|
#4 (permalink) |
|
rocks your socks.
Resident.
Joined in Mar 2004
Lives in fear of Obama.
Hosted on Pass 7
13,170 posts
Gave thanks: 8
Thanked 35 times
|
I looked at the page code and the form is processing via a cgi script called mailform, so I'm guessing it might be a cpanel script.
|
|
|
|