Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

textarea problem

Status
Not open for further replies.

martinb7

Programmer
Joined
Jan 5, 2003
Messages
235
Location
GB
Hi, i have a problem: on my site, when you type in a textarea, then click submit, it submits it to a db. this all works fine, but when i read it back out, it all appears on 1 line even if i did this with the enter key leaving lines in between:

first bit of text


next bit of text


then carried on this would be on the same line as the bit above. how do i get round this?

also, when they submit the form, it inserts it into a db - the field type is TEXT, should it be something else??


Thanx

Martin

Computing help and info:

 
you must replace the returns with the br tag

like
$newtext = str_replace (chr(13), &quot;<br>&quot;, $originaltext);
 
sorry I didn't press the link ;)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top