# Textarea save formatted

**URL:** https://forum.kirupa.com/t/textarea-save-formatted/279674
**Category:** Uncategorized
**Created:** [January 17, 2009, 1:04pm UTC](https://forum.kirupa.com/t/textarea-save-formatted/279674 "2009-01-17T13:04:24Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![forza\_stiinta](https://avatars.discourse-cdn.com/v4/letter/f/bc79bd/32.png) [@forza\_stiinta](https://forum.kirupa.com/u/forza_stiinta)
#### Post date: [January 17, 2009, 1:04pm UTC](https://forum.kirupa.com/t/textarea-save-formatted/279674/1 "2009-01-17T13:04:24Z")

</div>

I’m using a textarea for some data entry. The problem is that i have something like this

```auto
<textarea name='description'></textarea>

```

on the html page

On the php page:

```auto
mysql_query("INSERT INTO table(description) values('".$_POST['description."') WHERE id = '2'";

```

The problem is that I’m loosing formatting. like if enter in the textbox:

> line1 is here  
> l  
> i  
> n  
> e  
> 2  
> In the database it will be stored like  
> line1 is hereline2  
> How do I keep the formatting (basically just the break lines)?

Thanks!
