Current location: Hot Scripts Forums » Programming Languages » PHP » Help on textarea field when insert into mysql


Help on textarea field when insert into mysql

Reply
  #1 (permalink)  
Old 02-13-05, 01:02 PM
loeddie loeddie is offline
Newbie Coder
 
Join Date: Feb 2005
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Help on textarea field when insert into mysql

Dear all,

Here is my problem, I have a html page with textarea that will process to insert into mysql when submit being clicked, everything work fine except for the data in the textarea will group into one line, it means the carriage returns is missing, please let me know if any of you can help on this, thanks so much!

Best Regards
Eddie
Reply With Quote
  #2 (permalink)  
Old 02-13-05, 01:24 PM
NeverMind's Avatar
NeverMind NeverMind is offline
Community VIP
 
Join Date: Aug 2003
Location: K.S.A
Posts: 2,257
Thanks: 0
Thanked 2 Times in 1 Post
when you want to display/print the data of this textarea use nl2br() on it:
PHP Code:

echo nl2br($textarea); 

__________________
PHPSimplicity
We don't need a reason to help people - Zidane [FF9]
Reply With Quote
  #3 (permalink)  
Old 02-13-05, 02:20 PM
loeddie loeddie is offline
Newbie Coder
 
Join Date: Feb 2005
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
thank you so much, it's work fine now...^^
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with Auto Dealer Script nuzzle PHP 17 04-14-10 08:34 PM
Problem with Insert in MySql bionicsamir PHP 2 01-02-05 08:08 PM
Multiple form fields saved in one mysql field?? cebuy PHP 4 10-15-04 12:08 PM
Disable form fields to be submitted RickyRod JavaScript 2 05-24-04 10:15 AM
PHP to MySQL script question...(using a field to update info in MySQL) DisneyFan25863 PHP 4 11-02-03 03:31 AM


All times are GMT -5. The time now is 05:30 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.