I want to save an text from a textarea control as MYSQL data.
But it doesn't save that text as a multi line text.
It always remove line breaks on text when it saves.
How can I save the text as a multi line text?
Printable View
I want to save an text from a textarea control as MYSQL data.
But it doesn't save that text as a multi line text.
It always remove line breaks on text when it saves.
How can I save the text as a multi line text?
There is no reason why the line feeds would be stripped out. Can you post your code?
Are they actually removed or when you print the data after retrieving it from the database you don't get multiple lines?
The line breaks in the text area are \r\n (or just \n, I'm not sure), which won't do anything in HTML when you're printing the data again.
Ya, you are right manavo11!
replacing \n as <br> is working
Thank you for your help
Send debugging output as plain text to avoid this confusion.
PHP Code:header('Content-type: text/plain');
Or click view source :p
Its funny!
Thanks