Jump to content

Archived

This topic is now archived and is closed to further replies.

Rich464

Retaining carriage returns upon db entry

Recommended Posts

Hi there,

I'm having a (noobish) problem that I hope someone can help with.

I have written a small script to insert information from a form and insert it into the database, which seems to work fine, and I can get another page to echo out the information. The problem I'm having is I'm using a textarea tag on my form and it doesn't retain any of the carriage returns when the contents of the text area are submittedby the form so when I echo the information out of the database on another page, its all on one line.

I know why it does this but can't really think of a way around this. Anyone got any ideas, constructive help is much appreciated.

Thanks in advance
Rich [img src=\"style_emoticons/[#EMO_DIR#]/smile.gif\" style=\"vertical-align:middle\" emoid=\":smile:\" border=\"0\" alt=\"smile.gif\" /]

Share this post


Link to post
Share on other sites
The newlines are retianed, They are just not shown as html's < br / > tag. Take a look at [a href=\"http://php.net/nl2br\" target=\"_blank\"]nl2br[/a]().

Share this post


Link to post
Share on other sites
oh man! your a star!

Thanks for the quick turnaround, works perfectly

appreciated :)

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.