Hello I am facing a problem in my website development, I am using a html text area on my web page which is used to fill a field in database. The problem is that when I submit the text it converts the multiline text into single line.

e.g
Hello,
I am a super hero.

Will be converted int
Hello I am a super hero.

Please help me how to avoid this.

Thanks

Please explain your post

hell try this:

$string=nl2br($_POST['textareaname']);

use $string in your insert query...

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.