Rich464 Posted June 8, 2006 Share Posted June 8, 2006 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 advanceRich [img src=\"style_emoticons/[#EMO_DIR#]/smile.gif\" style=\"vertical-align:middle\" emoid=\":smile:\" border=\"0\" alt=\"smile.gif\" /] Link to comment https://forums.phpfreaks.com/topic/11512-retaining-carriage-returns-upon-db-entry/ Share on other sites More sharing options...
trq Posted June 8, 2006 Share Posted June 8, 2006 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](). Link to comment https://forums.phpfreaks.com/topic/11512-retaining-carriage-returns-upon-db-entry/#findComment-43319 Share on other sites More sharing options...
Rich464 Posted June 8, 2006 Author Share Posted June 8, 2006 oh man! your a star!Thanks for the quick turnaround, works perfectlyappreciated :) Link to comment https://forums.phpfreaks.com/topic/11512-retaining-carriage-returns-upon-db-entry/#findComment-43326 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.