hi i would like to store the data of a text area inside mysql, and for that i want a suitable dtatype

For eg if the data in textarea is

hello hie are you
i'm fine!

currently i'm using varchar but th eproblem is that the data apperas in single line like ,

hello how are youi'm fine.

Depending on what you using to read from browser/GUI application and which language you using Java/C#/PHP...

When adding the data to the table, use nl2br function (if you are using php).

Depends upon how much data you would want to store. varchar is a choice, tinytext - max 255 chars, text - max 65535 chars are other options. There are also mediumtext and longtext .
Choose according to your needs. A complete summary of MySQL field types can be found here

When adding the data to the table, use nl2br function (if you are using php).

ok so if i use ths function....will i get the data in the same format whn pronting bak to texarea???

Yeah. Try it out. :)

You are welcome :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.