Jump to content

Archived

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

bgp1

php and textarea

Recommended Posts

Hello,

I have a form that users submit and it includes a textarea. I want it to capture the returns they put in the textarea into a mysql database. I have this much done. But, when I print the data back out, I want it to be formatted where there are returns. How can I go about doing this?


Thanks!

Share this post


Link to post
Share on other sites
while your text area is stored in the database it keeps track of the return strokes, but if you want those to apear on your webpage, you use the command to convert them to line breaks

nl2br(); should do the trick

Share this post


Link to post
Share on other sites
That worked! Thanks for the help!

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.