Okay. Its really hard to tell what you're trying to do from your message but here goes... write two functions
first function converts all newline characters to <br> (HTML line break tags) and second function reconverts all <br> (HTML line break tags) back to newline characters for redisplay in the text box.
Such that when you ask for input from the textbox and separate the text by hitting carriage returns, the first function converts this into <BR >'s and this gets stored in the database such that your sql query would be something like
// $string has \n (newline) characters
$string = function1($string);
// $string now has <br> in place of \n (newlines)
$sql = "INSERT INTO tableName VALUES('$string');
now once you read this out back into the textbox (say for later revision)
your next function (function2) will reconvert all <br > tags into newlines again
while ($somerow = mysql_fetch_row($result_id)) {
// get $string which contains <br > tags
$string = $somerow[0];
$string = function2($string);
}
// later on in your html
<textarea rows=5 cols=30>< ? php echo "$string"; ? ></textarea>
you result should be properly formatted as if you had originally started
hope that helps