Page 1 of 1

[solved]form posting textarea problem

Posted: Mon May 21, 2007 8:00 am
by dharprog
Hi

I'm using a textarea tag in a form and passing the values and retrieving them in other php page with post method.

My problem is whatever i type in the textarea is just appending all the lines and just printing like this "Hi
House is for ready to occupy. COntact 3234232 thank you. "

But what i want is i would like to get it as line by line how can i do it in our php?

Line by line means:
-------------------------
Hi
House is for ready to occupy.
COntact 3234232,
thank you.

I'm just entering the lines as it is above in the textarea box.

Anybody Please kindly help me out from this.

Thank you.

Posted: Mon May 21, 2007 8:20 am
by blackbeard
If you're just trying to display the contents of the text area, you'll either have to wrap the contents in a <pre> tag, or you can use the nl2br function to convert newlines into <br />

The newlines are there, but browers need to be told what do do with them.